हिंदी

Some of the code given below contains errors. Identify the error and correct it. Write the output of the correct/corrected code. double KB[] = {3.12, 4.64, 5.57, 6.23, 7.25}; for( int j=0; j<=

Advertisements
Advertisements

प्रश्न

Some of the code given below contains errors. Identify the error and correct it. Write the output of the correct/corrected code.

double KB[] = {3.12, 4.64, 5.57, 6.23, 7.25};
for( int j=0; j<= 5; j++)
KB[j] = (int)KB[j];
System.out.print("KB[2] =" + KB[2]);
कोड लेखन
Advertisements

उत्तर

double KB[] = {3.12, 4.64, 5.57, 6.23, 7.25};
for (int j = 0; j < 5; j++) {
    KB[j] = (int) KB[j];
}
System.out.print("KB[2] =" + KB[2]);
}
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 7: Arrays - One Dimension - Exercises [पृष्ठ १७४]

APPEARS IN

रुपा पंडित Computer Applications [English] Class 10 ICSE
अध्याय 7 Arrays - One Dimension
Exercises | Q 3. (iv) | पृष्ठ १७४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×