#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 / pratap keshari
The output will be 27 6
b++ will be replaced as 3++ in the macro and these values
will be evaluated after the macro execution.Hence first it
will evaluate to 3's cube and then increment 3 three times
| Is This Answer Correct ? | 10 Yes | 7 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?
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?
Why should a c++ programmer be interested in stl?
What is stl language?
please visit this site you'll find my question this is my homework please answer it if you can http://easyscience.org/ib/lofiversion/index.php/t36168.html
What is a standard template library (stl)? What are the various types of stl containers?
How do I convert a stl file?
Q1. A. What is unary operator? List out the different operators involved in the unary operator. B. What is an adjust field format flag? Q2. A. Distinguish between a # include and #define. B. Can a list of string be stored within a two dimensional array? Q3. A.Explain how a pointer to function can be declared in C++? B.List the merits and demerits of declaring a nested class in C++? Q4. A. What are the syntactic rules to be avoid ambiguity in multiple inheritence? B. Explain the operation of overloading of an assignment operator. Q5. A. Explain how the virtual base class is different from the conventional base classes of the opps. B. Explain how an exception handler is defined and invoked in a Program. Q6. A. What is a binary file? List the merits and demerits of the binary file usagein C++. B. Write short notes on Text Manipulation Routines. C. Write bites in Turbo c++ Header (“Include”) Files.
What do stl stand for?
What is stl stack?
How do you convert stl to steps?
How does an stl file work?
Name the different types of stl containers.