C Programming language

C Programming Language : C Keywords, Data types in C, Data type modifiers in C
Previous Home Next

A C Programming Language programmer has to tell the system the type of numbers or characters he is using in his program. these are data types. There are many data types in C Programming Language. Data types are used to store various types of data.

C has a concept of 'data types' which are used to define a variable before its use. A C programmer use appropriate data type as per his requirement.

C supports various data types such as character, integer and floating-point types. Please note that there is not a Boolean data type.

All the data types are made up of units of memory called bytes.

n order of size, starting with the smallest, the integer types are char, short, int, long. The smaller types take less memory, the larger types takes more space in memory.

C has different data types for different types of data and they are classified as:

  1. Primary Data Types
  2. Secondary Data Types

 

C Keywords

Keywords are the words whose meaning has already been explained to the C compiler. The keyword can't be used as variable names because if we do so, we are trying to assign a new meaning to the keyword, which is not allowed by the computer. The keywords are also called the Reserved Keywords. There are only 32 keywords available in C.

Some Important Keywords in C Programming Language int, char, double, float, switch, case, if, else, for, while, long, short etc.

Note: Compiler vendors provide their own keywords apart from mentioned above. These include Extended keywords like near, far, asm, etc. Such compiler specific keywords should be preceded by two underscore sign AS __far.

Data type modifiers in C Programming Language

short, long: Used only for int (integers), to change size of the data type for save memory space. The short modifier reduces the size of the data type to half itís regular storage capabilities.

unsigned, signed: Also used only for int. Unsigned modifies int to positive number range. Signed is the default modifier for all of the data types. unsigned restricts the data type so that it can only store positive values. By default all data types are signed. Signed means that the data type is capable of storing both positive and negative values.

long long: The size of long long modifier is at least 64 bits. Again was with both the short and long we have two types of the long long, signed and unsigned.

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: