0
Tell the output of below program
#include<stdio.h> void main(){ int a=1+2*2-1%2; printf("%d",a); }
2 ответов
+ 4
* and % have higher precedence than + and -. So, (1) + (2 * 2) - (1 % 2) = 1 + 4 - 1 = 4 is the output.
+ 1
4
#include<stdio.h> void main(){ int a=1+2*2-1%2; printf("%d",a); }