#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 / jayprakash singh
in question we use #define CUBE(X) (X*X*X) but in main
function we use a=cube(b++);
what is this i think it is wrong it must be error at
compile time.
if we use a=CUBE(b++); instead of a=cube(b++);then output
will be 27 6
becuse 1st (3*3*3)=27 then increment of value b thrice so b=6
| Is This Answer Correct ? | 1 Yes | 5 No |
Post New Answer View All Answers
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 stl vector?
What is stl stack?
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 two types of containers does the stl provide?
What is the use of stl?
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.
how to use C++?
write a program to convert a decimal number in to its equivalent binary number?
draw a flowchart that accepts two numbers and checks if the first is divisible by the second.
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
What does stl mean in slang?
how to making game in c++ ?
Is stl part of c++ standard?
In what scenario does the Logical file and Physical file being used?