...
UGC NET CS 2005 Dec-Paper-2
August 21, 2024
UGC NET CS 2005 Dec-Paper-2
August 21, 2024

UGC NET CS 2014 June-paper-3

Question 10
Match the following with respect to the jump statements :

List – I List – II

a. return i. The conditional test and increment portions

b. goto ii. A value associated with it

c. break iii. Requires a label for operation

d. continue iv. An exit from only the innermost loop

A
a-ii, b-iii, c-iv, d-i
B
a-iii, b-iv, c-i, d-ii
C
a-iv, b-iii, c-ii, d-i
D
a-iv, b-iii, c-i, d-ii
Question 10 Explanation: 
The return statement terminates the execution of a function and returns control to the calling function. Execution resumes in the calling function at the point immediately following the call. A return statement can also return a value to the calling function.
Goto statement: The goto statement transfers the program control directly to a labeled statement.A common use of goto is to transfer control to a specific switch-case label or the default label in a switch statement. The goto statement is also useful to get out of deeply nested loops.
Break statement: The break statement terminates the execution of the nearest enclosing do, for, switch, or while statement in which it appears. Control passes to the statement that follows the terminated statement.
Continue statement: The continue statement passes control to the next iteration of the nearest enclosing do, for, or while statement in which it appears, bypassing any remaining statements in the do, for, or while statement body.
Correct Answer: A
Question 10 Explanation: 
The return statement terminates the execution of a function and returns control to the calling function. Execution resumes in the calling function at the point immediately following the call. A return statement can also return a value to the calling function.
Goto statement: The goto statement transfers the program control directly to a labeled statement.A common use of goto is to transfer control to a specific switch-case label or the default label in a switch statement. The goto statement is also useful to get out of deeply nested loops.
Break statement: The break statement terminates the execution of the nearest enclosing do, for, switch, or while statement in which it appears. Control passes to the statement that follows the terminated statement.
Continue statement: The continue statement passes control to the next iteration of the nearest enclosing do, for, or while statement in which it appears, bypassing any remaining statements in the do, for, or while statement body.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!