Advertisements
Advertisements
प्रश्न
Given:
int AM[]= {3, 6, 12, 24, 48 96};
for (int p= 3; p<6 ; p++)
System.out.print ("*" + AM[p]/2);
The output will be ______.
पर्याय
* 6 * 12 * 24 * 48
* 12 * 24 * 48
12 * 24 * 48 *
* 24 * 48 * 96
MCQ
रिकाम्या जागा भरा
Advertisements
उत्तर
The output will be * 12 * 24 * 48.
Explanation:
The loop starts from index 3 and continues up to index 5. It accesses the elements 24, 48, and 96 of the array. Each element is divided by 2, resulting in 12, 24, and 48. These values are printed with an asterisk (*) before each value. Hence, the output is *12*24*48.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 7: Arrays - One Dimension - Exercises [पृष्ठ १७३]
