Computer Applications
Predict the output:
int a=6,b=5,c;
c = (a++ % b++) *a + ++a*b++;
Java
Java Operators
40 Likes
Answer
c = 55
Working
c = (a++ % b++) *a + ++a*b++
c = (6 % 5) * 7 + 8 * 6
c = 1 * 7 + 8 * 6
c = 7 + 48
c = 55
Answered By
22 Likes
Related Questions
State the difference between = and ==.
Give the output of the snippet:
int a=10,b=12; if(a>=10) a++; else ++b; System.out.println(a + "and" +b);
Give the output of the snippet:
int a = 3; while (a<=10) { a++; if(a== 5) continue; System.out.println(a); }
Write a program to accept marks in Physics, Chemistry and Biology. The program calculates the average and displays the stream accordingly:
Average Marks Stream 80% and above Computer Science 60% or more but less than 80% Bio-Science 40% or more but less than 60% Commerce