The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+13 votes
1.1k 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.9k points)
edited by | 1.1k views
+1

2 Answers

+28 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 (384k 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.
+4 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.6k 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
47,894 questions
52,261 answers
182,169 comments
67,679 users