1. What is the result of the expression (5 > 3) && (7 < 10)?
Explanation: Both conditions are true, so the result is true.
Report for correction2. What is the result of the expression (10 % 3)?
Explanation: The expression (10 % 3) returns the remainder of the division, which is 1.
Report for correction3. What is the result of the expression (4 + 6 * 2) / 3?
Explanation: The expression is evaluated as (4 + 12) / 3 = 16 / 3 = 10.
Report for correction4. Which logical operator represents "AND" in most programming languages?
Explanation: The logical operator "AND" is typically represented as "&&" in many programming languages.
Report for correction5. Which control structure allows a program to perform different actions based on different conditions?
Explanation: A switch statement allows a program to perform different actions based on different conditions.
Report for correction6. In a while loop, how is the loop condition checked?
Explanation: In a while loop, the condition is checked before entering the loop.
Report for correction7. In a do-while loop, when is the loop condition checked?
Explanation: In a do-while loop, the condition is checked after executing the loop.
Report for correction8. Which control structure is used to create a loop that repeats indefinitely until a certain condition is met?
Explanation: A while loop is used to create a loop that repeats until a certain condition is met.
Report for correction9. Which control structure is used to execute a block of code repeatedly while a condition is true?
Explanation: A for loop is used for repetitive execution based on a condition.
Report for correction10. Which operator is used to represent "OR" in most programming languages?
Explanation: The logical operator "OR" is typically represented as ",," in many programming languages.
Report for correction11. In an if-else statement, what happens if none of the conditions are true and there is no "else" block?
Explanation: If none of the conditions in an if-else statement are true and there is no "else" block, execution continues with the next statement after the if-else block.
Report for correction12. What does the "continue" statement do in a loop?
Explanation: The "continue" statement is used to skip the current iteration and continue to the next iteration of the loop.
Report for correction13. What does the "break" statement do in a loop or switch statement?
Explanation: The "break" statement is used to exit a loop or switch statement.
Report for correction14. Which of the following is not a control structure in programming?
Explanation: Data type declaration is not a control structure; it's used to define the type of data a variable can hold.
Report for correction15. In a for loop, which part of the loop controls the iteration count?
Explanation: In a for loop, the increment expression controls the iteration count.
Report for correction16. In a switch statement, what happens if no case matches the provided value?
Explanation: In a switch statement, if no case matches, the default case (if present) is executed.
Report for correction17. What is the purpose of control structures in programming?
Explanation: Control structures are used to control the order in which statements are executed in a program.
Report for correction18. What is the purpose of the "if" statement in control structures?
Explanation: The "if" statement is used to make decisions based on a condition in control structures.
Report for correction19. What is the purpose of an if-else statement?
Explanation: An if-else statement is used to make decisions based on a condition.
Report for correction20. What is the purpose of the "default" case in a switch statement?
Explanation: The "default" case in a switch statement is executed when none of the other cases match.
Report for correction21. In a switch statement, what is the purpose of the "break" statement?
Explanation: The "break" statement is used to exit the switch statement after a case is matched.
Report for correction22. What is the purpose of the "else" block in an if-else statement?
Explanation: The "else" block in an if-else statement is executed when the condition is false.
Report for correction23. What is the purpose of a "try-catch" block in programming?
Explanation: A "try-catch" block is used to handle exceptions and errors that may occur during program execution.
Report for correction24. What is the purpose of the "else if" statement in control structures?
Explanation: The "else if" statement is used to provide an alternative condition to check when the previous condition is false.
Report for correction25. Which logical operator represents "NOT" in most programming languages?
Explanation: The logical operator "NOT" is typically represented as "!" in many programming languages.
Report for correction