Find the Output for the Given Code
What will be the output for the following code? main() { int c=- -2; printf("c=%d",c); }
Answers
Answered by
0
2... as - (-2) will be 2.
the - is treated as unary minus.. so there are two unary minus used..
main() {
int c =- -2;
printf("c=%d",c);
}
the - is treated as unary minus.. so there are two unary minus used..
main() {
int c =- -2;
printf("c=%d",c);
}
Similar questions