#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 ? | 53 Yes | 14 No |
Post New Answer View All Answers
What is stl in c++ with example?
What is stl in oop?
What two types of containers does the stl provide?
Is there any error below, its a code to delete all entires from a map #include
How connect plc and pc through software
write a program to convert a decimal number in to its equivalent binary number?
What do stl stand for?
Explain stl.
how to making game in c++ ?
how to use C++?
Is string part of stl?
What does stl stand for in basketball?
What are the various types of stl containers?
What are the different types of stl containers?
What are stl algorithms?