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

What are pointers? What are different types of pointers?

1224


Are c and c++ the same?

1111


What is the argument of a function in c?

1104


given post order,in order construct the corresponding binary tree

2858


What is string in c language?

1252


How many bytes are occupied by near, far and huge pointers (dos)?

1220


What is sizeof return in c?

1091


What are comments and how do you insert it in a C program?

1303


What is the scope of global variable in c?

1038


Explain what standard functions are available to manipulate strings?

1130


What is an example of structure?

1102


What does c mean before a date?

1233


What is file in c language?

1052


How do you define a function?

1079


Can you please explain the difference between exit() and _exit() function?

1086