Why doesn't the code "int a = 1000, b = 1000;
long int c = a * b;" work?
Answer Posted / shruti
i think, the result exceeds the long int value..
the result is 10 and 6 0s..
and it exceeds the value for the long in
long int is 4 bytes..
the highest value is 65524 (m not very sure.. this could be
one of the reasons)..
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What is getch () for?
Why flag is used in c?
explain what is a newline escape sequence?
Are global variables static in c?
Give basis knowledge of web designing ...
explain what is fifo?
What are the 3 types of structures?
How can a program be made to print the line number where an error occurs?
Why do we use stdio h and conio h?
Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.
How main function is called in c?
What is d'n in c?
What is null pointer in c?
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
What is getch() function?