#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 / prabhaaa

since macro is expanded like (x++ * x++ * x++) = (3 * 4 *
5) ..here the value increments in each of its position. first [3 *3++*(3++)++] = [3*4*4++]
= [3*4*5]
a = 60
and here b increments three times .3++=4, 4++=5 ,5++=6.
final value of b = 5++ => 6

ans : 60, 6

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does stl mean in slang?

652


please visit this site you'll find my question this is my homework please answer it if you can http://easyscience.org/ib/lofiversion/index.php/t36168.html

1777


Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.

1646


Describe the My Computer and My Documents folders; identify the elements that are present in every Window.

1859


sir please send me bpcl previous question papers

1959






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


What two types of containers does the stl provide?

573


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


what is template and type convertion

1999


Define stl.

778


What is stl language?

678


i wanted to know about questions about c,c++ , which is required for placements.... im a fresher

1702


Who created stl?

654


Is stl part of c++ standard?

643


When did c++ add stl?

740