Ask Question
30 May, 19:54

Give the out put of the program snippet

Int a = 10, b = 12;

If (a>=10)

a++;

Else

++b;

System. out. println (" a = " + a + " and b = " + b);

+1
Answers (1)
  1. 30 May, 21:14
    0
    Output will be as follows

    a = 11

    b = 12

    Explanation:

    In this program, two values 10, and 12 assigned to two variables a and b respectively. In next step the values of a has been checked that whether it is equal to 10 or greater than 10. so according to the assigned values, a is equal to 10 so a is incremented by 1 and becomes 11. while there is no change in the value of b.

    So the output of a = 11 and b = 12.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Give the out put of the program snippet Int a = 10, b = 12; If (a>=10) a++; Else ++b; System. out. println (" a = " + a + " and b = " + b); ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers