edited by
419 views

1 Answer

Best answer
13 votes
13 votes
When an integer constant overflows the size of integer it automatically gets converted to the higher type like from int to long. So, we do not need "L" suffix unless we want to explicitly do this conversion (for example to ensure the result of an operation using this does not overflow).

A $4$ byte integer has $31$ bits excluding the sign bit. So, this can represent ${31} \times \log 2 \approx 9$ digits. So, Clearly A and C won't overflow. long int being of size 8 bytes can represent at least $2 \times 9 = 18$ digits and so D option also cannot overflow.

Correct Answer: B
selected by
Answer:

Related questions

7 votes
7 votes
3 answers
2
Arjun asked Oct 18, 2016
1,649 views
The output of the following C program will be _____#include<stdio.h #define type int type foo(type b) { return b*b; } #undef type #define type float int main() { float a ...