#define CUBE(x) (x*x*x)
main()
{ int a,b=3;
a=cube(b++);
printf("%d %d",a,b);
}
What should be the value of a and b? My calc a=4 but syst
a=6 how pls tell me if you know it?

Answer Posted / vasanth

since macro is expanded like (x++ * x++ * x++) = (3 * 4 *
5) => a = 60
and final value of b = 5++ => 6

ans : 60, 6

Is This Answer Correct ?    31 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can u do connectivity in c++ language? plz send me connectivity code in c++ ?

1895


How is stl different from c++ standard library?

746


How connect plc and pc through software

1923


What is a list in c++ stl?

694


What is a stl vector?

628






Define stl.

778


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

2097


What is the use of stl?

637


Who wrote stl?

678


What is stl in oop?

681


How stl is different from the c++ standard library?

641


Can we use stl in coding interviews?

1282


how to making game in c++ ?

2181


What is stl stand for?

742


What is stl language?

678