Advertisements
Advertisements
प्रश्न
Consider the program segment:
int p=0;
for(p=4 ; p>0 ; p- =2);
System.out.print(p);
System.out.println(p);
The above statements will display:
पर्याय
42
4200
0
000
MCQ
Advertisements
उत्तर
00
Explanation:
Since there are no statements in the loop, no values of p are printed inside the loop. When the loop ends p has become 0. The last two print statements print the value of p, that is 00.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2024-2025 (March) Official Board
