C Programming and Technical Programming Definition

Out of fgets() and gets() which function is safe to use
and why?

Read Solution (Total 1)

C Other Question

Which files will get closed through the fclose() in the following program?
#include
int main()
{
FILE *fs, *ft, *fp;
fp = fopen("A.C", "r");
fs = fopen("B.C", "r");
ft = fopen("C.C", "r");
fclose(fp, fs, ft);
return 0;
}
Options
1) "A.C" "B.C" "C.C"
2) "B.C" "C.C"
3) "A.C"
4) Error in fclose()
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()