"The" Book of C

Learn C Programming

  • Get The Book
  • 1st Edition Solutions
    • Solutions
    • Errata
  • Industry Campus Connect
  • About Authors
  • Home

Category: Best Practices

  • Home
  • Best Practices

Avoiding Overflow and Underflow

By : Priyanka Bhaskar Posted On : October 15, 2018April 15, 2019No Comment

What is overflow? Overflow is a situation when an arithmetic operation results in a value that is too large to be stored in the specified datatype. Let’s consider the following example: int a = 2147483647; a++; printf (“value of a is %d\n”, a); The range for an int datatype (assuming its size to be 4…

Continue Reading

Top

Copyright © 2025 "The" Book of C - WordPress Theme : By Offshore Themes

  • 1st Ed Errata
  • 1st Edition Solutions
    • Arrays
    • Bit By Bit
    • Data Types – The Sequel
    • Dynamic Memory Allocation
    • Files
    • Flowcharts
    • Functions
    • Introduction To Programming
    • Loops
    • Making decisions – if-else
    • More Decisions, Mastering if-else
    • Operators
    • Operators Revisited
    • Pointers
    • Preprocessing and Macros
    • Reading User Input Into Variables
    • Strings
    • Switch Case
    • The Rest Of It
    • User Defined Data Types
    • Variables and Data Types
  • About Authors
  • About The Book of C
  • Buy The Book
  • Industry Campus Connect