in Programming in C retagged by
721 views
0 votes
0 votes

 

in Programming in C retagged by
by
721 views

8 Comments

My doubt is here m*n should produce an Overflow Shouldn't it ?

So we need to keep it in range if we do that then the answer is very different it comes out to be -14. But answer is 3000. I don't know why its not an overflow ?
0
0
m*n = $15\times 10^5$

$m*n < 2^{31} -1$

why overflow?
0
0
Doesnt int range from $-2^{31}$ to $2^{31}-1$, for a 4 byte int?
0
0
Na462! is considering int to be of 2 byte, I guess!
0
0
Yeah i am assuming it to be of 16bits
0
0
how to decide whether to consider int to be of 2 byte or 4 byte,

as generally i consider it to be of 2 byte
0
0
if it is depends upon size, in GATE they must specify what to take
1
1
if it is not specified then we have to take 4 Byte. As we take the default for c in any competitive programming or programming.
0
0

Please log in or register to answer this question.

Related questions