C Programming and Technical Programming Definition

What is the purpose of fflush() function.

Options
1) flushes all streams and specified streams.
2) flushes only specified stream.
3) flushes input/output buffer.
4) flushes file buffer.

Read Solution (Total 3)

C Other Question

Point out the error in the following program.
#include
#include
fun(...);

int main()
{
fun(3, 7, -11.2, 0.66);
return 0;
}
fun(...)
{
va_list ptr;
int num;
va_start(ptr, n);
num = va_arg(ptr, int);
printf("%d", num);
}
Options
1) Error: fun() needs return type
2) Error: ptr Lvalue required
3) Error: Invalid declaration of fun(...)
4) No error
Which standard library function will you use to find the last occurance of a character in a string in C?

Options
1) strnchar()
2) strchar()
3) strrchar()
4) strrchr()