evaluate java expression: if int a = 21, b; find b = a++*a++/2 ;
Answers
Answered by
3
#include
int main() {
int a = 6, b = 6;
// a is displayed
// Then, a is increased to 7.
printf("%d post-increment n", a++);
// b is increased to 7
// Then, it is displayed.
printf("%d pre-incrementn", ++b);
return 0;
}
int main() {
int a = 6, b = 6;
// a is displayed
// Then, a is increased to 7.
printf("%d post-increment n", a++);
// b is increased to 7
// Then, it is displayed.
printf("%d pre-incrementn", ++b);
return 0;
}
Similar questions