Advertisements
Advertisements
प्रश्न
Given:
int PM[] = {650, 525, 475, 325, 250, 175 };
for (int p = 5; p>=1 ; p--)
System.out.print (" % “ + PM[p]%100);
The output will be ______.
पर्याय
% 50, %2 5, %75, %25, %50, %75
% 75 % 50 % 25 % 75 % 25
75 % 50 % 25 % 75% 25%
% 175 % 250 % 325 % 475 % 525
MCQ
रिकाम्या जागा भरा
Advertisements
उत्तर
The output will be % 175 % 250 % 325 % 475 % 525.
Explanation:
The loop starts from index 5 and moves backward to index 1. For each element, the remainder after dividing by 100 is calculated using the modulus % operator. The results 75, 50, 25, 75, and 25 are printed, each preceded by the % symbol. Therefore, the output is % 75 % 50 % 25 % 75 % 25.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
