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

p*=(++q)++*--p when p=q=1 while(q<=6)

1766


Write a Program to accept different goods with the number, price and date of purchase and display them

6240


How to draw the flowchart for structure programs?

9348


Give me the code of in-order recursive and non-recursive.

1378


Explain how can a program be made to print the line number where an error occurs?

1225


Can we use visual studio for c?

1103


What is variables in c?

1055


What is file in c language?

1010


What is c variable?

1050


What are pointers really good for, anyway?

1067


What is difference between array and pointer in c?

1100


how many errors in c explain deply

2096


How can you call a function, given its name as a string?

1163


Differentiate between static and dynamic modeling.

1141


What are the types of operators in c?

1069