Question 1: Variable Naming Rules
Which of the following is a valid variable name in C?
Question 2: Assignment Operators
The expression x += 5; is equivalent to which of the following?
Question 3: If-Else Statement
What is the output of the following C code?
Question 4: While Loop Execution
What will be the output?
Question 5: Recursive Function
Which of the following functions is an example of recursion?
Question 6: 2D Array Size
How many elements does an array int arr[3][4]; contain?
Question 7: Pointer Arithmetic
If p is an integer pointer pointing to address 1000, what will p+1 point to (assuming 4-byte int)?
Question 8: Union Behavior
What will be printed?
Question 9: fputc() Function
What will this program do?
Question 10: gets() Function
Why is gets() considered unsafe in C?
Question 11: Guess the Output - sizeof Operator
Assuming a 32-bit system, what is the output of this code?
Question 12: Operator Precedence
What is the output of the following C code?
Question 13: Else-If Ladder
What is the output of the following C code?
Question 14: Nested Loop
If an outer loop runs 5 times and an inner loop runs 4 times, how many total iterations occur?
Question 15: Recursion Example
What is the output of the following code?
Question 16: 2D Array Access
What will be printed?
Question 17: Double Pointer
What will be the output?
Question 18: Nested Structures
Which of the following is valid for nested structures?
Question 19: EOF Constant
What does EOF stand for in C file handling?
Question 20: strcpy() Function
What will be printed?