Match the following with respect to I/O classes in object oriented programming…

2014

Match the following with respect to I/O classes in object oriented programming :

List – I (Statements)

List – II (Descriptions)

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

Codes :

Answer: A. a-ii, b-iii, c-iv, d-iCorrect matching with explanations: return → A value associated with it: The return statement passes a value back to the caller (it is used to return data…

  1. A.

    a-ii, b-iii, c-iv, d-i

  2. B.

    a-iii, b-iv, c-i, d-ii

  3. C.

    a-iv, b-iii, c-ii, d-i

  4. D.

    a-iv, b-iii, c-i, d-ii

Attempted by 84 students.

Show answer & explanation

Correct answer: A

Correct matching with explanations:

  • return → A value associated with it: The return statement passes a value back to the caller (it is used to return data from a function).

  • goto → Requires a label for operation: goto transfers control to a labeled statement, so a label is required for its target.

  • break → An exit from only the innermost loop: break terminates the nearest enclosing loop (or switch) and resumes execution after it.

  • continue → The conditional test and increment portions: continue skips the rest of the current loop iteration and proceeds to the loop's update/test step (in a for-loop this means the increment then the condition check).

Final mapping: a-ii, b-iii, c-iv, d-i

Explore the full course: Mppsc Assistant Professor Computer Science Paper 2

Loading lesson…