# 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 / shruti
the syntax for writting the macro is wrong..
we can't have "=" sign while writing macro..
i.e. #define -----
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What is structure and union in c?
What is mean by data types in c?
What is a string?
explain what are actual arguments?
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
What is a program flowchart?
What are the types of data types and explain?
write a proram to reverse the string using switch case?
What's a good way to check for "close enough" floating-point equality?
What are register variables in c?
Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.
Can we use any name in place of argv and argc as command line arguments?
What is difference between scanf and gets?
Difference between pass by reference and pass by value?
What are run-time errors?