#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
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
Define stl.
Why should a c++ programmer be interested in stl?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
i wanted to know about questions about c,c++ , which is required for placements.... im a fresher
What is the use of stl?
Is string part of stl?
What is a list in c++ stl?
What are the various types of stl containers?
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
how can u do connectivity in c++ language? plz send me connectivity code in c++ ?
How stl is different from the c++ standard library?
What is stl language?
Is stl open source?
write a program to convert a decimal number in to its equivalent binary number?