C Programming - Mock Interview Test

1. What is the correct syntax for printing a string in C?

2. Which operator is used to assign a value to a variable in C?

3. What is the correct syntax for a for loop in C?

4. Which of the following is the correct way to declare an integer variable in C?

5. Which of the following is used to terminate a loop in C?

6. What is the default value of a static variable in C?

7. Which header file is required to use the printf function in C?

8. What is the correct way to declare a pointer in C?

9. What is the size of an int in C?

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

11. Which keyword is used to declare a constant in C?

12. Which function is used to get the length of a string in C?

13. Which of the following is correct for a function in C?

14. Which of the following is used for multi-line comments in C?

15. What is the correct syntax to define a function in C?

16. How do you declare an array in C?

17. Which function is used to copy a string in C?

18. Which of the following is correct for including a standard header file in C?

19. What is the result of the expression 5 + 3 * 2 in C?

20. Which function is used to open a file in C?