C Data Types

In primary data types, we have Char, Int, Float short int, long int.

The size of data types depends on Operating System and Hardware.

Mainly the size of integer data types depends on Compilers.

Compilers                  short              int            long

12 bit Compilers          2 bytes           2 bytes       4 bytes

32 bit Compilers          2 byte             4 bytes       4 bytes

  Example of C Data Types:-

 

#include<stdio.h>
#include<conio.h>

void main()
{

printf("the value of integer=%d",sizeof(int));
getch();
}

  Exmaple of C Data Types:-

#include
#include
void main()
{
char a=67;
printf("\n %d %c \n",a,a);
getch();
}

Result :-

67 C

  Size of data type of 32 bit Compiler :-

Data Type Range Bytes Format
 signed char

unsigned char

short signed int

short unsigned int

signed int

unsigned int

long signed int

long unsigned int

float

double

long double

-128 to +127

0 to 255

-32768

0 to 65535

-2147483648 to +2147483647

0 to 4294967295

-2147483648 to +21474883647

0 to 4294967295

-3.4e38 to +3.4e38

-1.7e308 to +1.7e308

-1.7e4932 to 107e4932

 1

1

2

2

4

4

4

4

4

8

10

 %c

%c

%d

%u

%d

%u

%ld

%lu

%f

%lf

%Lf




Follow Us

Contact Us

tutorialworldin@yahoo.com

Back to Top