What is the output of the code below? for (int val = 0; val < 4; val ++)
{
System.out.print ("+") ;
For (int num = 0; num < val; num++)
{
System.out.print ("0") ;
}
}
A) +0+00+000+0000
B) +000+000+000+000
C) ++0+00+000
D) ++++000000
Correct Answer:
Verified
Q46: What is the output of the following
Q47: What will be printed by the statements
Q48: Which of the following loops will print
Q49: What will be printed by the statements
Q50: What will be printed by the statements
Q52: What does the following loop compute? Scanner
Q53: How many times does the following loop
Q54: What will be printed by the statements
Q55: What will be printed by the statements
Q56: Which of the following conditions can be
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents