9,212 views
7 votes
7 votes
An unrestricted use of the “goto” statement is harmful because
(a) it makes it more difficult to verify programs
(b) it increases the running time of the programs
(c) it increases the memory required for the programs
(d) it results in the compiler generating longer machine code

2 Answers

Best answer
17 votes
17 votes

(a) it makes it more difficult to verify programs
goto in no way can increase the running time or memory requirement of the program. It also doesn't contribute to longer machine code. But the use of goto can result in unstructured code and there can be blocks with multiple entry and exit points which can cause a nightmare for program verification. 

 

selected by
0 votes
0 votes
I think answer will depend on program size and page size

in this question if we consider program size is large and can't fit in 1 page then goto may point to different pages at different times so more time will be required (for page replacements)also if we say time taken for execution is to be minimized( page replacement  time is less) then main memory should be more to accumulate all the pages so there is a tradeoff between time and memory so what should be the answer of this question?? as no program size is given

Related questions

0 votes
0 votes
0 answers
1
1 votes
1 votes
1 answer
2
sh!va asked Mar 2, 2017
1,583 views
The "go to statement" causes control to go to(a) An operator(b) A label(c) A variable(d) A function
0 votes
0 votes
1 answer
3
Rahul Kumar 1 asked May 8, 2015
854 views