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

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

Q.22Easy

What is the size of the double data type in most 64-bit systems?

Q.23Easy

Which of the following variable names is INVALID in C?

Q.24Easy

What will be the result of sizeof(int) on a typical 32-bit system?

Q.25Medium

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

Q.26Medium

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

Q.27Medium

Which of the following demonstrates proper type casting in C?

Q.28Medium

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

Q.29Medium

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

Q.30Medium

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

Q.31Medium

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

Q.32Medium

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

Q.33Medium

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

Q.34Medium

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

Q.35Hard

What is true about the variable declared as 'extern int count;' inside a function?

Q.36Hard

Consider a structure with int (4 bytes), char (1 byte), and double (8 bytes). What is the minimum size due to alignment requirements?

Q.37Hard

Which of the following statements about type qualifiers is INCORRECT?

Q.38Easy

What is the default data type of a floating-point constant in C?

Q.39Medium

What is the size of int data type on a 32-bit system according to C standard?

Q.40Medium

In the declaration 'int arr[10], *ptr;', which statement is correct?