WAP TO PRINT VALUE OF MULTIPLE DATA TYPES

Thursday, July 2, 2009 Leave a Comment


#include<stdio.h>
#include<conio.h>
void main ()
{
int a=10;
float d=35.40;
char ch='A';
double dbl=71.3456;
long lng=9777811;
char nm [10]="SARTAJ";
clrscr ();
printf ("\nInteger value is %d",a);
printf ("\nFloat value is %.2f",d);
printf ("\nCharacter value is %c",ch);
printf ("\nDouble value is %.4lf",dbl);
printf ("\nLong value is %ld",lng);
printf ("\nString value is %s",nm);
getch ();
}

OUTPUT
Integer value is 10
Float value is 35.40
Character value is A
Double value is 71.3456
Long value is 9777811
String value is SARTAJ

Related Posts :



0 comments »

Leave your response!