Question 1: Character Data Type
Which of the following data types is used to store a single character and occupies 1 byte of memory?
Question 2: Modulus Operator
What is the result of the expression 20 % 6?
Question 3: Purpose of switch statement
The switch statement is best suited for scenarios where you need to:
Question 4: Do-While Loop
What is the key difference between a while and a do-while loop?
Question 5: Function Declaration
Where is a function prototype (declaration) usually placed in a C program?
Question 6: Array Initialization
Which of the following correctly initializes an array in C?
Question 7: Pointer Dereferencing
What will be the output of this program?
Question 8: Structure Access
What will be the output?
Question 9: fopen() Error Handling
What will this program print if data.txt does not exist?
Question 10: strlen() Function
If char str[] = "C Language";, what will strlen(str) return?
Question 11: Guess the Output - Type Mismatch
What will be the output of the following C code snippet?
Question 12: Logical AND Operator
What is the output of the following C code?
Question 13: The break keyword
What is the main purpose of the break keyword inside a switch statement?
Question 14: Break Statement
What does the break statement do inside a loop?
Question 15: Return Type
What does a function return if its return type is not specified in C (default)?
Question 16: Accessing Array Elements
What will the following code print?
Question 17: Pointer Assignment
What will be printed?
Question 18: Pointer to Structure
What will be printed?
Question 19: fprintf() Function
What will this program do?
Question 20: puts() Function
What will this program print?