# 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
Explain what does the format %10.2 mean when included in a printf statement?
C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions
What is the importance of c in your views?
Explain what is the benefit of using const for declaring constants?
What is getche() function?
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?
What is a node in c?
What is keyword with example?
What is the correct declaration of main?
What is #line?
How can I automatically locate a programs configuration files in the same directory as the executable?
What is the difference between far and near ?
Explain what does the function toupper() do?
Why c language is called c?
What is operator promotion?