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...

Why doesn't the code "int a = 1000, b = 1000;
long int c = a * b;" work?

Answer Posted / larry

This won't work if int is a 16-bit size because 1000000 >
32767 (2 to the 15th - 1). It will work when int is a 32-
bit number. It will work if you cast a or b to a long.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is the use of a semicolon (;) at the end of every program statement?

1203


What does printf does?

1209


Explain how are 16- and 32-bit numbers stored?

1232


What is main () in c?

1034


What is a program flowchart and explain how does it help in writing a program?

1266


define string ?

1081


What is an lvalue?

1031


Why is it usually a bad idea to use gets()? Suggest a workaround.

1722


What are the standard predefined macros?

1097


What does calloc stand for?

1116


what is a constant pointer in C

1116


Explain setjmp()?

1034


What is advantage of pointer in c?

1148


What are the advantages and disadvantages of a heap?

1170


Explain the concept and use of type void.

1076