Computer Applications
Give the output of the program snippet.
int a = 10, b =12;
if(a>=10)
a++;
else
++b;
System.out.println(" a = " + a + " and b = " +b);
Related Questions
Evaluate the following expressions, if the values of the variables are a = 2, b = 3 and c = 3
i. a - (b++) * (--c)
ii. a * (++b) %c
If a = 5, b = 9, calculate the value of:
a += a++ - ++b + aRewrite the following using ternary operator.
if(income<=100000) tax = 0; else tax = (0.1*income);
Rewrite the following using ternary operator.
if(p>5000) d = p*5/100; else d = 2*p/100;