Unit 4 - Integer data types ( int )

Posted on Friday, May 7, 2010 by B[H] | 0 comments
Labels:

Key words int is use to declare variable integer number

Syntax int name_identifier
example : int bilangan ;
int nom1,nom2;

This declaration means that the compiler was asked to hold integer data name bilangan, nom1 and nom 2. Integer data types is classified as sign (+) and unsigned (-).For all the computer system, data integer is refer to 0 and 1 bits. There are three types of integer short int, int, long int. The comparison of this integer range in value.

Short int : -32768 to 32767
Int : -32768 to 32767
Long int : -2147483648 to 2147483648
Unsigned short int: 65535
Unsigned int: 65535
Unsigned long int : 4294967295

No comments:

Post a Comment