1. What is the only function all C programs must contain?
2. What will be the output of: #include void main() { char a[6] = 'Hello'; printf('%d', sizeof(a)); }
3. Which special symbols are allowed in a variable name?
4. In C ....
5. C99 standard guarantees uniqueness of ____ characters for internal names.
6. Which file modes would mean read + append?
7. Following code snippet? void main() { int num1 = 30, num2 = 4; float result; result = (float)(num1/num2); printf('%.2f', result); return 0; }
8. What will be the content of 'file.c' after executing the following program? #include int main() { FILE *fp1,*fp2; fp1=fopen('file.c','w'); fp2=fopen('file.c','w'); fputc('A',fp1); fputc('B',fp2); fclose(fp1); fclose(fp2); return 0; }
9. Comment on the statement: int (*a)[7];
10. Output of this C code (if run with no options or arguments)? #include int main(intargc, char *argv[]) { printf('%d\n', argc); return 0; }
11. ________ functions are dynamically bound by the compiler.
12. Which is the smallest program to compile and run without errors?
13. Which is not a correct way to declare a string variable?
C Programming MCQs | Topic-wise