#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 ? | 52 Yes | 14 No |
Post New Answer View All Answers
Is there any error below, its a code to delete all entires from a map #include
What is the stl, standard template library?
What is a stl vector?
What is a standard template library (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.
What are the various types of stl containers?
What are the components of stl?
Who wrote stl?
help me i need a c++ program which takes sequesnce of characters and outputed sequence of their token taypes, work same compiler in lexical analysis phase
What is a list in c++ stl?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
Describe the My Computer and My Documents folders; identify the elements that are present in every Window.
What are stl algorithms?
Is string part of stl?
How stl is different from the c++ standard library?