The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+12 votes
980 views

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
asked in Programming by Veteran (59.6k points)
edited by | 980 views
+1

2 Answers

+26 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.
answered by Veteran (363k points)
edited by
0
what is "structural decomposition of the code "?
0
Means decomposing a code to multiple basic blocks which all have a single entry and single exit.
+3 votes
Solution : A) It makes it more difficult to verify programs.

Proof of correctness : https://en.wikipedia.org/wiki/Goto#Criticism
(1st Paragraph, last 4 lines.)

answered by Active (1.4k points)
edited by
Answer:

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

42,686 questions
48,650 answers
156,466 comments
63,961 users