3. Data Types (C Program)
#include<stdio.h>
#include<conio.h>
void main()
{
int a=2;
short int b=2;
long c=3;
long int d=3;
unsigned long x=10;
unsigned short int y=20;
char d1='A';
unsigned char d2='B';
float m=2.25;
double n=6.67;
clrscr();
Vinay Arora
CSED
4. Data Types (C Program) contd.
printf("For int and Short Int %d t %i",a,b);
printf("nFor long and long Int %ld t %ld",c,d);
printf("nFor unsigned long and unsigned short Int %u t %u",x,y);
printf("nFor char and unsigned char %c %d t %c %d",d1,d1,d2,d2);
printf("nFor float and double %f t %lf",x,y);
getch();
}
Vinay Arora
CSED