#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 / pratap keshari

The output will be 27 6

b++ will be replaced as 3++ in the macro and these values
will be evaluated after the macro execution.Hence first it
will evaluate to 3's cube and then increment 3 three times

Is This Answer Correct ?    10 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you like to Submit Questions in Bulk under Same Category?? Then use our Bulk ListerDo you like to Submit Questions in Bulk under Same Category?? Then use our Bulk Lister

1666


how to use C++?

2067


draw a flowchart that accepts two numbers and checks if the first is divisible by the second.

2866


what is template and type convertion

1999


To modify an, existing worksheet. What steps are involved for: 1. Inserting and deleting rows and columns. 2. Printing cell formulas 3Jld displayed values 3. Using the page setup command

1785






How do I convert a stl file?

570


What is stl stand for?

742


What are the components of stl?

628


When did c++ add stl?

742


Is stl open source?

638


What is stl in c++ with example?

639


Who wrote stl?

682


What do stl stand for?

645


Can we use stl in coding interviews?

1284


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

1897