मराठी

Given: int ta[ ] = {11, 22, 33, 44, 55}; ar[3]+= ar[2]; System.out.print(“ ar[3]=" + ar[3]); The output will be ______.

Advertisements
Advertisements

प्रश्न

Given:

int ta[ ] = {11, 22, 33, 44, 55};
ar[3]+= ar[2];
System.out.print(“ ar[3]=" + ar[3]);

The output will be ______.

पर्याय

  • ar[3]=44

  • ar[3]=33

  • ar[3]=55

  • ar[3]=77

MCQ
रिकाम्या जागा भरा
Advertisements

उत्तर

The output will be ar[3]=77.

Explanation:

  • Value Lookup: Based on zero-indexing, ar[2] equals 33 and ar[3] equals 44.
  • Addition Step: The expression ar[3] + = ar[2] performs 44 + 33, updating ar[3] to 77.
  • Final Print: The print statement displays the text directly with the newly updated value.
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 7: Arrays - One Dimension - Exercises [पृष्ठ १७३]

APPEARS IN

रूपा पंडित Computer Applications [English] Class 10 ICSE
पाठ 7 Arrays - One Dimension
Exercises | Q 1. (vi) | पृष्ठ १७३
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×