C Programming - MCQ Practice Questions
Practice free C Programming multiple-choice questions with detailed answers and explanations. Perfect for competitive exam preparation.
978 questions | 100% Free
Which of the following is the correct syntax to declare a variable in C?
What does the following code snippet output? #include <stdio.h> int main() { int x = 5; printf("%d", x++); return 0; }
What is the output of: printf("%d", 5 + 3 * 2)?
What is the purpose of the main() function in C?
Which escape sequence represents a tab character in C?
Which keyword is used to create a variable that cannot be modified after initialization?
What is the output of the following code? #include <stdio.h> int main() { int arr[] = {10, 20, 30}; printf("%d", *(arr + 1)); return 0; }
In C, which of the following statements about pointers is TRUE?
What will be printed by the following code? #include <stdio.h> int main() { char str[] = "Hello"; printf("%c", str[1]); return 0; }
What is the output of the following code? #include <stdio.h> int main() { char c = 'A'; printf("%d", c); return 0; }
Which of the following is the correct syntax to declare a pointer to an integer in C?
What is the size of 'char' data type in C?
Which of the following variable names is valid in C?
What is the default return type of the main() function in C?
Which escape sequence is used to print a newline character in C?
What is the size of the 'int' data type in a 32-bit system according to C standard?
Which of the following is NOT a valid C identifier?
In C, what is the size of the 'char' data type?
What is the output of: char c = 65; printf("%c", c);
Which header file is required to use the malloc() function?