C-Control Instructions Questions and Answers
In C programming, control instructions define the flow of execution using decision-making, looping, and branching statements. Commonly tested in programming questions and answers, this concept evaluates a candidate’s logical thinking and problem-solving skills. Companies like TCS, Wipro, and Infosys often include C control instruction questions with answers in their online assessments and interviews. By mastering conditional statements (if-else, switch), loops (for, while, do-while), and jump statements, programmers can write optimized code. This section provides solved C programming MCQs and explanations to help you understand control flow deeply and perform better in technical placement rounds.
C-Control Instructions
Showing 10 of
24 questions
11. How many times will this loop execute: while(0){ printf("Hello"); }
- 0 times
- 1 time
- Infinite times
- 2 times
12. What is the purpose of switch statement in C?
- To declare variables
- To perform mathematical operations
- To handle multiple conditions efficiently
- To define arrays
13. Which is mandatory in a switch statement?
- default case
- break statement
- case values
- All are mandatory
14. What happens if break is omitted in a switch case?
- Compiler error
- Execution stops
- Falls through to next case
- Jumps to default case
15. Which operator has highest precedence in condition checks?
- Logical AND (&&)
- Logical OR (||)
- Logical NOT (!)
- All have same precedence
16. What is the result of: if(5) printf("True"); else printf("False");
- True
- False
- Compilation error
- Runtime error
18. What is goto statement used for?
- To call functions
- To declare variables
- For unconditional jumping within function
- To terminate programs
19. Which loop is best when number of iterations is known?
- while loop
- do-while loop
- for loop
- All are equally good
20. What does while(1) represent?
- Loop that runs once
- Infinite loop
- Loop that never runs
- Conditional loop