# 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
How many types of operators are there in c?
What are the various types of control structures in programming?
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
Are pointers integers in c?
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.
What is variable declaration and definition in c?
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
What is the difference between int main and void main in c?
write a program to generate address labels using structures?
What does %d do?
Describe static function with its usage?
What is huge pointer in c?
What is the hardest programming language?
What are the advantages and disadvantages of a heap?
How do you declare a variable that will hold string values?