The Gateway to Computer Science Excellence
+14 votes

An unrestricted use of the "$goto$" statement is harmful because

  1. it makes it more difficult to verify programs
  2. it increases the running time of the programs
  3. it increases the memory required for the programs
  4. it results in the compiler generating longer machine code
in Programming by Veteran
edited by | 1.4k views

2 Answers

+32 votes
Best answer
Use of $goto$ takes out the structural decomposition of the code and hence it becomes very difficult to verify or debug the code. As far as performance or memory impact is concerned, $goto$ has no effect on them.

Correct Answer: $A$
by Veteran
edited by
what is "structural decomposition of the code "?
Means decomposing a code to multiple basic blocks which all have a single entry and single exit.
+4 votes
Solution : A) It makes it more difficult to verify programs.

Proof of correctness :
(1st Paragraph, last 4 lines.)

by Active
edited by

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
52,215 questions
60,027 answers
94,712 users