C Programming MCQ Test (25 Marks)

MCQ Quiz on C Programming

MCQ Quiz on C Programming

1. Who is the father of C programming language?





2. Which of the following is a valid C variable name?





3. What is the size of `int` in C on a 32-bit system?





4. What is the output of `printf("%d", (5 + 2) * 3);`?





5. Which of the following is not a valid storage class in C?





6. Which of the following is used to declare a constant in C?





7. Which of the following is the correct syntax for a `for` loop in C?





8. Which header file is used for input/output operations in C?





9. What is the purpose of `return 0;` in the `main()` function?





10. Which operator is used to access the value at the address stored in a pointer variable?





11. What is the output of the following code: `printf("%d", 5 + 2 * 3);`?





12. Which of the following is used to define a macro in C?





13. Which of the following is a correct way to declare a pointer in C?





14. Which of the following operators is used to allocate memory dynamically in C?





15. What is the correct syntax for declaring a function in C?





16. Which of the following is true about the `switch` statement in C?





17. What does the `sizeof` operator in C return?





18. Which of the following is the correct way to define an array in C?





19. What is the correct way to comment a block of code in C?





20. Which of the following is the correct syntax to declare a constant in C?





21. What is the result of the expression `5/2` in C when both operands are integers?





22. Which of the following is not a valid pointer operation in C?





23. Which keyword is used in C to define a constant value?





24. What is the default value of an uninitialized static variable in C?





25. Which of the following operators is used for bitwise AND operation in C?





Comments

Popular posts from this blog

Programming Notes by Atul Kalukhe