0 votes 0 votes main() { int c=- -2; printf("c=%d",c); } Programming in C programming-in-c output + – Desert_Warrior asked May 16, 2016 Desert_Warrior 1.0k views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply srestha commented May 16, 2016 i edited by srestha May 16, 2016 reply Follow Share print 2 -(-2) =+2 2 votes 2 votes Desert_Warrior commented May 16, 2016 reply Follow Share even Space matters !! but --2 won't work.. as increment and decrement operators should be with variables not constants. 1 votes 1 votes srestha commented May 16, 2016 reply Follow Share yes space matter :) 0 votes 0 votes Please log in or register to add a comment.
Best answer 7 votes 7 votes main() { int c=- -2; // Here -2 is a integer constant and second - is an unary operator // Hence C will get +2 printf("c=%d",c); //2 will be printed here as c's value } Hence the output is c=2 rude answered May 17, 2016 • selected May 17, 2016 by Desert_Warrior rude comment Share Follow See all 0 reply Please log in or register to add a comment.