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

Write the control statements in C language

1205


how should functions be apportioned among source files?

1101


What is volatile keyword in c?

1034


What is the difference between ā€˜g’ and ā€œgā€ in C?

3998


Explain what are bus errors, memory faults, and core dumps?

1276


What is null in c?

1090


Why c is a procedural language?

1053


This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory

1267


Explain 'far' and 'near' pointers in c.

1138


What are linked lists in c?

1130


What is main () in c?

1071


What is scope rule in c?

1062


Explain the difference between structs and unions in c?

1021


What are header files why are they important?

1088


When c language was developed?

1059