# 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

How many types of operators are there in c?

784


What are the various types of control structures in programming?

789


how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

3026


Are pointers integers in c?

786


Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.

841






What is variable declaration and definition in c?

677


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

847


What is the difference between int main and void main in c?

796


write a program to generate address labels using structures?

4260


What does %d do?

930


Describe static function with its usage?

831


What is huge pointer in c?

751


What is the hardest programming language?

894


What are the advantages and disadvantages of a heap?

883


How do you declare a variable that will hold string values?

895