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
What is the sizeof () operator?
What does 3 periods mean in texting?
Explain the use of #pragma exit?
How are variables declared in c?
What’s a signal? Explain what do I use signals for?
What are the different types of C instructions?
What is the benefit of using an enum rather than a #define constant?
Which is better malloc or calloc?
How do you do dynamic memory allocation in C applications?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
When is a “switch” statement preferable over an “if” statement?
What is spaghetti programming?
Is c easy to learn?
How can I copy just a portion of a string?
hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel