Professional Documents
Culture Documents
Duration: 1 hour
Q1.
Q2.
Q3.
What is the size and range of long double data type on a 16- bit
Machine?
Q4.
Q5.
Q6.
Which files will get closed through fclose() in the following program?
#include<stdio.h>
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;
}
Q7.
Out of fgets() and gets() which function is safe to use and Why?
Explain.
Q8.
Q9.
return 0;
}
Q10. In the below code atexit() function is not called? Give reason for
support your answer.
#include<stdio.h>
voidfunc(void)
{
printf("\n Cleanup function called \n");
return;
}
int main(void)
{
int i = 0;
atexit(func);
for(;i<0xffffff;i++);
_exit(0);
}