#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 / karthik p b

a will be 27 and b will be 6.

since the cube root of 3 is assigned to 'a' it will contain the value 27, and after this 'b' will gets incremented 3 times (x++ * x++ * x++) hence 'b' will become 6

so a = 27 b= 6

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by stl in c++?

657


When did c++ add stl?

742


write a program that will accept a number and print.its equivalent in words the maximum input number is 9999

2504


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.

1978


What is the stl, standard template library?

600






What is a standard template library (stl)? What are the various types of stl containers?

674


Name the different types of stl containers.

695


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

1885


What two types of containers does the stl provide?

573


What is stl stack?

665


What is the use of stl?

639


What is a standard template library (stl)?

649


What does stl mean in slang?

653


How stl is different from the c++ standard library?

645


Who wrote stl?

682