#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 / karthik p b

a will be 27 and b will be 6.

since the cube root of 3 is assigned to 'a' it will contain the value 27, and after this 'b' will gets incremented 3 times (x++ * x++ * x++) hence 'b' will become 6

so a = 27 b= 6

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

641


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

1664


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

2862


What is stl in c++ with example?

634


What are the components of stl?

624






Can we use stl in coding interviews?

1282


Why should a c++ programmer be interested in stl?

645


What is the stl, standard template library?

600


Who created stl?

654


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

1895


How connect plc and pc through software

1923


Is stl open source?

634


How does an stl file work?

654


What is a stl vector?

628


how to making game in c++ ?

2181