#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 / maitri
Couple of things:
a. macro is expanded as (x++ * x++ * x++)
b. what we have here is a postfix operator
so a = CUBE(3)=3*3*3
and b = 6 (incremented thrice)
| Is This Answer Correct ? | 55 Yes | 14 No |
Post New Answer View All Answers
What does stl mean in slang?
What is a standard template library (stl)? What are the various types of stl containers?
What are the various types of stl containers?
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.
Why should a c++ programmer be interested in stl?
write a program to convert a decimal number in to its equivalent binary number?
Describe the My Computer and My Documents folders; identify the elements that are present in every Window.
What is a stl vector?
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
What is stl in c++ with example?
Who created stl?
draw a flowchart that accepts two numbers and checks if the first is divisible by the second.
Name the different types of stl containers.
How do I convert a stl file?
Is there any error below, its a code to delete all entires from a map #include