Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

#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 ?    55 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does stl mean in slang?

1078


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

1132


What are the various types of stl containers?

1128


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.

1920


Why should a c++ programmer be interested in stl?

1053


write a program to convert a decimal number in to its equivalent binary number?

2612


Describe the My Computer and My Documents folders; identify the elements that are present in every Window.

2497


What is a stl vector?

1197


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

2206


What is stl in c++ with example?

1116


Who created stl?

1130


draw a flowchart that accepts two numbers and checks if the first is divisible by the second.

3341


Name the different types of stl containers.

1136


How do I convert a stl file?

1056


Is there any error below, its a code to delete all entires from a map #include #include iostream.h int main() { int i =0; map TestMap; while(i<3) { TesMap.insert(TestMap::value_type(i,Test)); i++; } typedef map :: iterator mapIter =TestMap.begin(); if(mapIter!=TestMap.end()) { TestMap.erase(mapItrer); ++mapIter; } return 0; }

2359