C Programming - MCQ Practice Questions
C questions in placement tests and university exams are rarely about syntax alone. Most of what you will find here is output prediction, pointer arithmetic, arrays and strings, structures and unions, storage classes, recursion, and file handling. The explanations walk through memory behaviour step by step, which is usually where the confusion sits rather than in the code itself.
972 questions | 100% Free
What is the size of int data type on a 32-bit system according to C standard?
In the declaration 'int arr[10], *ptr;', which statement is correct?
Which of the following correctly declares a constant integer variable?
What happens when you assign a larger data type value to a smaller one?
What is the output of: printf("%d", sizeof(int) + sizeof(char))?
What is the difference between 'char' and 'unsigned char' for character representation?
In C, what is the result of: int x = 5.7?
What will happen if you declare a variable without initializing it?
Which format specifier is used for printing a long integer?
Which keyword is used to make a variable retain its value between function calls?
What is the output of the following code?
int x = 10;
int *p = &x;
printf("%d", *p + 5);
Which of the following declarations allocates memory for a variable?
What will be the output of: printf("%ld", sizeof(long double));
Which storage class has global scope and external linkage by default?
What is the purpose of the 'volatile' keyword?
Which variable declaration uses automatic storage duration?
What is the result of: printf("%d", (int)(3.9) + 0.5);?
What is the behavior of 'auto' keyword in modern C (C99 onwards)?
What will be the output of: int x = 10; printf("%u", -x);
Which keyword is used to declare a variable that maintains its value between function calls?