#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
draw a flowchart that accepts two numbers and checks if the first is divisible by the second.
What two types of containers does the stl provide?
Who created stl?
write a program that will accept a number and print.its equivalent in words the maximum input number is 9999
How does an stl file work?
Name the different types of stl containers.
Who wrote stl?
what is template and type convertion
Is string part of stl?
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.
write a program to convert a decimal number in to its equivalent binary number?
How stl is different from the c++ standard library?
i wanted to know about questions about c,c++ , which is required for placements.... im a fresher
totoo po ba ang manga aliens!
What are stl algorithms?