Bird
0
0

Why is the use of goto generally discouraged in modern C programming?

hard📝 Conceptual Q10 of 15
C - Loop Control Statements
Why is the use of goto generally discouraged in modern C programming?
ABecause it causes syntax errors
BBecause it cannot jump to labels inside the same function
CBecause it can make code harder to read and maintain
DBecause it is slower than loops
Step-by-Step Solution
Solution:
  1. Step 1: Understand drawbacks of goto

    Goto can create confusing jumps making code flow hard to follow and maintain.
  2. Step 2: Evaluate other options

    Goto does not cause syntax errors if used correctly, can jump inside same function, and speed is not main issue.
  3. Final Answer:

    Because it can make code harder to read and maintain -> Option C
  4. Quick Check:

    Goto discouraged for readability reasons [OK]
Quick Trick: Goto harms readability and maintainability [OK]
Common Mistakes:
  • Thinking goto causes syntax errors
  • Believing goto cannot jump inside function
  • Assuming performance is main issue

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Quizzes