Huawei
Company
Programming
Database
What will be output if you will compile and execute the following ccode?
#define call(x,y) x##y
void main()
{
int x=5,y=10,xy=20;
printf("%d",xy+call(x,y));
}
(A) 35
(B) 510
(C) 15
(D) 40
(E) None of above
Read Solution (Total 2)
-
- i tested by compiling answer is 40 no doubt
- 9 years agoHelpfull: Yes(2) No(0)
- ## is concatination operation in macros so it will become xy, and xy=20
so ans is 40 - 7 years agoHelpfull: Yes(1) No(0)
Huawei Other Question