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 will be the output of: int x = 10; printf("%d %d", x, x++);
Consider the expression: int arr[5]; What does arr represent without the index?
Which storage class has a default value of 0 if not explicitly initialized?
What will be the output of the following code? #include <stdio.h> int main() { int x = 5; printf("%d", ++x + x++); return 0; }
What is the main difference between #define and const in C?
Which of the following correctly declares a function pointer?
What will be the output of the following code? #include <stdio.h> int main() { int x = 5; int y = ++x * ++x; printf("%d", y); return 0; }
Consider a function declared as 'static int func()'. What is the scope of this function?
What is the output of: printf("%d", (int)3.7);?
Which of the following best describes the 'register' storage class in modern C compilers?
What will be the output of: int x = 5; printf("%d", x++ + ++x);
What is the result of: int x = 10; int y = x++ + x++;
What is the output of: int x = 5; int y = ++x + x++;
What is the scope of a variable declared inside a block with 'static'?
What will be the output of: int a = 1; int b = 2; a = a + b; b = a - b; a = a - b; printf("%d %d", a, b);
Which of the following about function pointers in C is correct?
What is the output of: float x = ; printf("%f", x);
Which of the following correctly uses memcpy()?
Consider the following declaration: int (*func_ptr)(int, int, int); Which of the following function signatures can be correctly assigned to func_ptr?
What will be the size of the following structure? struct test { char c; int i; float f; };