What is the output of the following c code snippet?
#define MUL5(X) X*5
int y;
y=MUL5(2+4);
printf("%d", y);
A 30
B: 36
c 14
Answers
Answered by
1
Answer:
option A) 30
Explanation:
MUL5(x) function multiples its arguement (x) by 5 and returns it
MUL5(2+4) = MUL5(6) = 6x5 =30
Answered by
5
Answer:
22
Explanation:
Answer will be 22 Because if u run in c then the define directive will read as :-
2+4*5,
but if u put value y=MUL5((2+4))
then the answer will be 30.
so the correct ans for question is 22.
Similar questions
Chemistry,
1 month ago
Math,
1 month ago
Math,
3 months ago
Social Sciences,
3 months ago
Math,
9 months ago