Overflow and Underflow in Integer Data Type | C Programming



Overflow and Underflow in Integer Data Type | C Programming

Overflow and Underflow in Integer Data Type | C Programming

The range of numbers an Integer can represent is

-2^(n-1) to 2^(n-1)-1

here n is the size of an Integer variable in bits which depends on the compiler. For example if n=32 bits (4 Bytes) then the range of integers we can store is -2147483648 to 2147483647.

If we try to store -2147483649 which is less than -2147483648 then the condition is called as Underflow.

If we try to store 2147483648 which is more than 2147483647 then the condition is called as Overflow.

How does C compiler handle these situations of Underflow and Overflow ?

Lets check this out…….

Follow our C programming Playlist:
https://www.youtube.com/playlist?list=PLq6b-r81cS_wivFt10pq1t5dKOdzuYAqP

Like and Share our videos
Subscribe to our channel for more fascinating videos

Greetings,
MathsInDepth Team.
Welcome to our channel MathsIndepth.

About the channel :
We publish videos on concepts of C Programming like never before.
Along with this, we also publish videos on Applied Mathematics.

For more details about the channel, visit our website: https://mathsindepth.in/
Support us on:
Facebook: https://www.facebook.com/MathsInDepth…
LinkedIn: https://www.linkedin.com/company/math…
Instagram: https://www.instagram.com/mathsindepth/

#CProgramming #SPA #mathsindepth

Comments are closed.