PRASHNIKAप्रश्निका
‹ Back to the paper

For the given code snippet: int i; for( i = 5; i>=1; i--) System.out.println( )…

Computer Science20251 markMCQ
For the given code snippet:
int i;
for( i = 5; i>=1; i--)
    System.out.println( );
System.out.println(i);
  • aZero will be displayed as variable i has local scope with respect to the loop.
  • bZero will be displayed as variable i has global scope with respect to the loop.
  • cError – Undeclared variable i.
  • dOutput will be 1.

Answer

No answer yet.

Statements, Scope

From ISC Computer Science - Competency Focused Practice Questions (CISCE, August 2024), question 1.