C Programming and Technical Programming Program

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()

Read Solution (Total 1)

C Other Question

Out of fgets() and gets() which function is safe to use
and why?
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);