reopened by
695 views
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 ?
reopened by

1 Answer

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
edited by

Related questions

0 votes
0 votes
1 answer
1
0 votes
0 votes
0 answers
2
himgta asked Feb 19, 2019
370 views
https://www.sanfoundry.com/c-program-checks-strings-anagrams/what is the meaning of line number 32?
0 votes
0 votes
0 answers
3
Shubham Aggarwal asked Sep 1, 2018
382 views
Please explain i am not able to understand it.
0 votes
0 votes
0 answers
4
Sai Bhargav 1 asked Dec 22, 2017
198 views
For suppose in a programming language a variable is having the life time is entire runtime of the program.So if the memory address occupied by that variable is not used ...