C Programming and Technical Programming Program

To scan a and b given below, which of the following scanf() statement will you use?
#include
float a;
double b;

Options
1) scanf("%f %f", &a, &b);
2) scanf("%Lf %Lf", &a, &b);
3) scanf("%f %Lf", &a, &b);
4) scanf("%f %lf", &a, &b);

Read Solution (Total 12)

C Other Question

Consider the following program and what will be content of t?
#include
int main()
{
FILE *fp;
int t;
fp = fopen("DUMMY.C", "w");
t = fileno(fp);
printf("%dn", t);
return 0;
}

Options
1) size of "DUMMY.C" file
2) The handle associated with "DUMMY.C" file
3) Garbage value
4) Error in fileno()
Differentiate between a for loop and a while loop? What
are it uses?