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.41Medium

What will be the output of the following code? int x = 5; float y = x; printf("%f", y);

Q.42Medium

Which of the following occupies maximum memory in a 64-bit system?

Q.43Medium

What is the range of unsigned int in a 32-bit system?

Q.44Medium

What is the difference between 'static' and 'extern' variables?

Q.45Medium

What is the output of the following code? int x = 10; int *p = &x; printf("%d", *p);

Q.46Medium

Which variable storage class has default initialization to 0?

Q.47Medium

What is the output of this code? float x = ; printf("%f", x);

Q.48Medium

What happens when you declare a variable without initializing it?

Q.49Medium

Which data type is most suitable for storing a decimal number with high precision?

Q.50Medium

In C, which storage class has the longest scope and lifetime?

Q.51Medium

Which storage class variable is automatically initialized to 0 if not explicitly initialized?

Q.52Medium

Consider: long long int x; What is the minimum guaranteed size of x according to C standard?

Q.53Medium

Which of the following demonstrates proper type casting in C?

Q.54Medium

What is the difference between 'signed' and 'unsigned' char in terms of range?

Q.55Medium

Which keyword prevents a local variable from being optimized by compiler into a register?

Q.56Medium

In the declaration 'int *p, q;', what are the data types of p and q?

Q.57Medium

What happens when you attempt to store a double value in an int variable without explicit casting?

Q.58Medium

Which of the following is a correct way to declare a constant variable in modern C?

Q.59Medium

What is the output of: printf("%d", sizeof(char) + sizeof(int) + sizeof(float)); on a typical 32-bit system?

Q.60Medium

A variable declared with 'register' storage class suggests to the compiler to store it in: