# 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
Is file a keyword in c?
How do you use a pointer to a function?
What is the difference between pure virtual function and virtual function?
What is a macro in c preprocessor?
Where is volatile variable stored?
What does %c mean in c?
Why does everyone say not to use gets?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What is difference between structure and union with example?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
how to create duplicate link list using C???
How can I read and write comma-delimited text?
What is union and structure in c?
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
What is ambagious result in C? explain with an example.