Question 1: Purpose of if statement
The primary purpose of an if statement in C programming is to:
Question 2: if-else if vs. separate if
What is a key difference between using a series of separate if statements and using an if-else if ladder?
Question 3: Purpose of switch statement
The switch statement is best suited for scenarios where you need to:
Question 4: The break keyword
What is the main purpose of the break keyword inside a switch statement?
Question 5: The default case
The default case in a switch statement serves what purpose?
Question 6: Simple If Statement
What is the output of the following C code?
Question 7: If-Else Statement
What is the output of the following C code?
Question 8: Else-If Ladder
What is the output of the following C code?
Question 9: Nested If Statements
What is the output of the following C code?
Question 10: Logical Operators in If
What is the output of the following C code?