# 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
4. main() { int c=- -2; printf("c=%d",c); }
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?
Why header file is used in c?
Explain what is the difference between #include and #include 'file' ?
Can i use “int” data type to store the value 32768? Why?
what are bit fields? What is the use of bit fields in a structure declaration?
in iso what are the common technological language?
What is array in c with example?
to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?
Where are some collections of useful code fragments and examples?
Which built-in library function can be used to match a patter from the string?
how can f be used for both float and double arguments in printf? Are not they different types?
Is main is a keyword in c?
typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none
Explain what is the purpose of "extern" keyword in a function declaration?