# 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


Please Help Members By Posting Answers For Below Questions

4. main() { int c=- -2; printf("c=%d",c); }

1370


What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?

905


Why header file is used in c?

577


Explain what is the difference between #include and #include 'file' ?

585


Can i use “int” data type to store the value 32768? Why?

756






what are bit fields? What is the use of bit fields in a structure declaration?

1499


in iso what are the common technological language?

1637


What is array in c with example?

615


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?

1573


Where are some collections of useful code fragments and examples?

716


Which built-in library function can be used to match a patter from the string?

747


how can f be used for both float and double arguments in printf? Are not they different types?

610


Is main is a keyword in c?

610


typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

716


Explain what is the purpose of "extern" keyword in a function declaration?

623