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: const int x = 10; x = 20; printf("%d", x);
Which of these correctly represents a floating-point literal with exponent notation?
What is the range of values for a signed short int?
What is the primary purpose of the 'restrict' keyword introduced in C99?
What happens in this code: int arr[5]; int *p = &arr[0]; printf("%d", sizeof(p));
Which of the following is a valid declaration of a constant array?
In C programming, which of the following is NOT a fundamental data type?
What is the size of a 'long long int' variable in C on a 64-bit system?
Which keyword is used to declare a variable that cannot be modified after initialization?
Which of the following variable declarations will occupy the LEAST memory?
In C, what is the difference between 'int' and 'unsigned int' in terms of range on a 32-bit system?
What will be the result of the following expression: float x = 0.1 + 0.2; if(x == 0.3) printf("Equal"); else printf("Not Equal");
Which storage class has both 'static' and 'auto' properties in certain contexts?
What is the output of: int arr[3] = {1, 2, 3}; int *p = arr; printf("%d %d", *p, *(p+2));
Consider a scenario where you need to store a variable that can hold values up to 10 billion. Which data type is most suitable?
What happens when a volatile variable is declared in a multi-threaded C program?
In C programming, when you declare a variable as 'const int x = 5;', what happens if you try to modify it within the program?