iGET

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

Q.21Medium

What is the difference between 'break' and 'continue' statements in C?

Q.22Medium

In C, what is the correct way to pass a variable by reference using pointers?

Q.23Medium

What will be the result of the bitwise operation: 5 & 3 in C?

Q.24Medium

What does the 'extern' keyword indicate in C?

Q.25Medium

What is the correct syntax to define a macro with arguments in C?

Q.26Medium

What will be printed by: printf("%d", sizeof(float));

Q.27Medium

Which of the following is a correct way to initialize a character array with a string?

Q.28Medium

In C, what is the difference between #include <stdio.h> and #include "stdio.h"?

Q.29Medium

Which of the following statements about NULL is correct?

Q.30Medium

What will be printed by: int arr[3] = {1, 2, 3}; printf("%d", *(arr + 1));

Q.31Medium

In C99 and later standards, what is the purpose of 'inline' keyword?

Q.32Medium

What is the purpose of the getchar() function in C?

Q.33Medium

What will be the output of: int a = 5; int b = a < 10 ? 20 : 30; printf("%d", b);

Q.34Medium

Which of the following is correct about static variables in C?

Q.35Medium

What is the output of: printf("%d %d", 10 % 3, );

Q.36Medium

What does the 'volatile' keyword in C indicate?

Q.37Medium

Which of the following about register variables is TRUE?

Q.38Medium

Consider the following code: int x = 5; int *ptr = &x; int pptr = &ptr; printf("%d", pptr); What is the output?

Q.39Medium

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; }

Q.40Medium

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; }