# define prod(a,b)=a*b
main()
{
int x=2;
int y=3;
printf("%d",prod(x+2,y-10)); }
the output of the program is
a.8
b.6
c.7
d.none
Answer Posted / vint
Assuming '=' is added by mistake in the macro.
#define prod(a,b) a*b
int main()
{
int x=2, y=3;
printf("%d",prod(x+2,y-10));
return 0;
}
Ans: None
The output is -2
a*b
x+2*y-10
2+2*3-10
2+6-10
8-10
-2
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What is the size of structure pointer in c?
main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }
What language is c written?
When should we use pointers in a c program?
my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?
Why c is called procedure oriented language?
Why do we write return 0 in c?
How can I swap two values without using a temporary?
How to Throw some light on the splay trees?
Why is c so popular?
What language is windows 1.0 written?
When should the volatile modifier be used?
What is sizeof int?
What is indirection? How many levels of pointers can you have?
What is the newline escape sequence?