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
What is the difference between 'break' and 'continue' statements in C?
In C, what is the correct way to pass a variable by reference using pointers?
What will be the result of the bitwise operation: 5 & 3 in C?
What does the 'extern' keyword indicate in C?
What is the correct syntax to define a macro with arguments in C?
What will be printed by: printf("%d", sizeof(float));
Which of the following is a correct way to initialize a character array with a string?
In C, what is the difference between #include <stdio.h> and #include "stdio.h"?
Which of the following statements about NULL is correct?
What will be printed by: int arr[3] = {1, 2, 3}; printf("%d", *(arr + 1));
In C99 and later standards, what is the purpose of 'inline' keyword?
What is the purpose of the getchar() function in C?
What will be the output of: int a = 5; int b = a < 10 ? 20 : 30; printf("%d", b);
Which of the following is correct about static variables in C?
What is the output of: printf("%d %d", 10 % 3, );
What does the 'volatile' keyword in C indicate?
Which of the following about register variables is TRUE?
Consider the following code: int x = 5; int *ptr = &x; int pptr = &ptr; printf("%d", pptr); What is the output?
What will be printed by the following code? #include<stdio.h> int main() { int arr[5] = {1, 2, 3, 4, 5}; int *p = arr; printf("%d %d", *(p+2), arr[2]); return 0; }
What is the output of this code? #include<stdio.h> int main() { int a = 5, b = 10; a = a ^ b; b = a ^ b; a = a ^ b; printf("%d %d", a, b); return 0; }