#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

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

2931


Is stl part of c++ standard?

698


What is a list in c++ stl?

761


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

1971


What is stl stack?

725






Is string part of stl?

749


How is stl different from c++ standard library?

820


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

1923


write a program that will accept a number and print.its equivalent in words the maximum input number is 9999

2567


Name the different types of stl containers.

760


What is stl in oop?

771


a program using one dimensional array that searches a number if it is found on the list of given input numbers given by the user and locate its exact location in the list.

1445


What is the stl, standard template library?

650


sir please send me bpcl previous question papers

2023


Who created stl?

719