Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

how much larger integer i can input in c language?

standard integers : The amount of memory that a single int takes depends on the
hardware. However, you can expect an int to be at least 16 bits in size. This 
means that it can store values from -32,768 to 32,767, or more depending on 
hardware.

longer integers : The long data type stores integers like int, but gives a 
wider range of values at the cost of taking more memory. Long stores at least
32 bits, giving it a range of -2,147,483,648 to 2,147,483,647. Alternatively,
use unsigned long for a range of 0 to 4,294,967,295.

even longer integers : The long long data type is overkill for just about every
application, but C will let you use it anyway. It’s capable of storing at least
−9,223,372,036,854,775,807 to 9,223,372,036,854,775,807. Alternatively, get 
even more overkill with unsigned long long, which will give you at least 0 to 
18,446,744,073,709,551,615.
 
PREVIOUS NEXT
Tagged: #larger #integer #input
ADD COMMENT
Topic
Name
2+4 =