+ 1
Ple. Explain
#define sqr(i) i*i int main(){ printf ("%d%d", sqr (3), sqr (3+1)); }
4 Answers
+ 8
Mohd Vais
#define macro is used to substitute the value written after macro so sqr(i) will replace by iĂi
So when i value is (3+1) then due to macro substitution it will evaluate like 3+1Ă3+1 so 3+3+1=7 will return so output is 97
+ 1
Macro definition will replace the source code directly. So the second output will be 7, because 3 + 1 * 3 + 1
+ 1
What is output ?
- 1
explain what?