Tuesday 1 October 2013

C PROGRAM TO PRINT ALL DATA TYPE

#include<stdio.h>
void main()
{
char c;
int a;float f;
short int b;
int z;
char s[10];
int d;
clrscr();
printf("enter all data types in the order single character,octal integer,string,hexa decimal integer,decimal integer,float");
scanf("%c %o %s %x %d %f %hd",&c,&c,s,&d,&z,&f,&b);
printf("c=%c \n  c=%o \n s=%s \n d=%x \n z=%d \n f=%f b=%hd",c,c,s,d,z,f,bf);
getch();
}

No comments:

Post a Comment