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
Write the control statements in C language
how should functions be apportioned among source files?
What is volatile keyword in c?
What is the difference between āgā and āgā in C?
Explain what are bus errors, memory faults, and core dumps?
What is null in c?
Why c is a procedural language?
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
Explain 'far' and 'near' pointers in c.
What are linked lists in c?
What is main () in c?
What is scope rule in c?
Explain the difference between structs and unions in c?
What are header files why are they important?
When c language was developed?