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?

Answers were Sorted based on User's Feedback



#define CUBE(x) (x*x*x) main() { int a,b=3; a=cube(b++); printf("%d %d",a,b); } Wh..

Answer / vignesh1988i

surely 'a' cannot be 4 or 6.... it will be the value of b... since we are multiplying b++ thrice...... so surely 'a' cannot be 4 or 6.....

according to me b=6 , and a=60......


thank u

Is This Answer Correct ?    4 Yes 9 No

#define CUBE(x) (x*x*x) main() { int a,b=3; a=cube(b++); printf("%d %d",a,b); } Wh..

Answer / jesaul

The code will not compile. The macro is in wrong case.
After fixing that you would get 27 6

Is This Answer Correct ?    2 Yes 7 No

Post New Answer

More STL Interview Questions

how to swap two numbers in a linked list without exchanging the data but only the links?

3 Answers   Wipro,


Who created stl?

0 Answers  


tell about sorted linked list

1 Answers  


write a program that input four digit number and find how many 7 that number contains

4 Answers  


How Find, Replace and Go To commands ca be used to substitute one character string for another? Explain with the heIp of an example.

1 Answers  


write a c++ to define a class box with length,breadth and height as data member and input value(),printvalue() and volume() as member functions.

3 Answers  


Write a program to print the swapping in two no and using three variable.

5 Answers   Broadridge,


Explain stl.

0 Answers  


what is electronic software

1 Answers  


Who wrote stl?

0 Answers  


What is Constructor

14 Answers   Angel Broking,


what is a template?

2 Answers   Amazon, BITS, IBS, Wipro,


Categories