Control Structures Quiz - CBSE Class 10 ICT
Free practice quiz: Control Structures (CBSE Class 10 ICT). 18 multiple-choice questions with answers and explanations. Play online, no sign-up needed.
Play all 18 questions freeSample questions
What is a control structure in programming?
- A way to manage hardware
- A method to build desktop applications
- A way to manage the flow of a program
- A technique to optimize code
Show answer
Answer: C. A way to manage the flow of a program
Control structures are used to dictate the order of execution of the statements in a program.
What is the default flow of control in a program?
- Sequential execution
- Parallel execution
- Random execution
- Condensed execution
Show answer
Answer: A. Sequential execution
Programs execute in a sequential order unless control structures dictate otherwise.
Which symbol marks the beginning of a block in most syntax?
- #
- {}
- ()
- <>
Show answer
Answer: B. {}
In many programming languages, curly braces '{}' are used to define the start and end of a block of code.
When should 'if-else' be preferred over 'switch' statement?
- When there are multiple precise comparisons
- When dealing with a single integer
- When optimizing for memory
- When all decisions can be computed with arithmetic
Show answer
Answer: A. When there are multiple precise comparisons
An 'if-else' chain is more suitable for precise or logical conditions, unlike 'switch', which is better for predefined constant values.
Which of the following can be used as a synonym for 'control structure'?
- Data handling
- Flow control
- Loop architecture
- Simple block
Show answer
Answer: B. Flow control
Control structures are frequently referred to as flow control; they determine the path that execution will follow.