# 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


Please Help Members By Posting Answers For Below Questions

Explain what does the format %10.2 mean when included in a printf statement?

782


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

611


What is the importance of c in your views?

595


Explain what is the benefit of using const for declaring constants?

614


What is getche() function?

609






How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

593


What is a node in c?

550


What is keyword with example?

642


What is the correct declaration of main?

679


What is #line?

611


How can I automatically locate a programs configuration files in the same directory as the executable?

632


What is the difference between far and near ?

684


Explain what does the function toupper() do?

636


Why c language is called c?

571


What is operator promotion?

629