Ask Question
19 November, 11:13

The output of the following Java code is: Stoor. int count = 5; System. out. print ("Sto"); do { System. out. print ('o'); count--; } while (count > = 5); System. out. println ('r');

+2
Answers (2)
  1. 19 November, 11:32
    0
    True the output of the code snippet is Stoor

    Explanation:

    Let; s consider the code snippet line by line

    Line 1: int count = 5; This declares an int variable and assigns 5 to it

    Line 2: System. out. print ("Sto"); This will print Sto and leave the cursor on same line

    Line 3: do { System. out. print ('o'); count--; } This do ... while statement will print o, making the initial output to become Stor leaving the cursor on same line

    Line 4: while (count > = 5); This will terminate the loop since count is not greater than 5.

    Line 5: System. out. println ('r'); This will print r making the initial output to become Stoor
  2. 19 November, 11:33
    0
    The true output of the code
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “The output of the following Java code is: Stoor. int count = 5; System. out. print ("Sto"); do { System. out. print ('o'); count--; } while ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers