1 votes 1 votes #define lol(a) a+a*a int main(void) { int a=3; printf("%d",lol(a+2)); return 0; } what is the output ? Programming in C programming-in-c + – Satbir asked Jan 16, 2019 • reopened Jan 16, 2019 by Satbir Satbir 695 views answer comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments muthu kumar commented Jan 16, 2019 reply Follow Share If it is defined in brackets like (a)+(a)*(a). then this can be possible right? 1 votes 1 votes prashant jha 1 commented Jan 16, 2019 reply Follow Share Preprocessor keeps it as it is with no assumed brackets 1 votes 1 votes muthu kumar commented Jan 16, 2019 reply Follow Share Bro, Check this 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes #define lol(a) a+a*a Although it looks like a function call, Each formal parameter will be replaced by the actual parameter because it is a macro expansion, it expands the in-line code. Therefore, a+a*a= a+2+a+2*a+2 =3+2+3+2*3+2=8+6+2=16 teja1521 answered Feb 25, 2019 • edited Feb 23 by teja1521 teja1521 comment Share Follow See all 0 reply Please log in or register to add a comment.