Showing posts with label WAP to print value of multiple data types. Show all posts
Showing posts with label WAP to print value of multiple data types. Show all posts

VALUE OF DATA TYPE

WAP to print value of multiple data types

#include

#include

void main ()

{

int a=10;

float d=40.50;

char ch='A';

double dbl=78.9786;

long lng=7897711;

char nm [10]="JIMMY";

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 ();

}

Labels