Program in C to print value of multiple data types

Write a program in C to print value of multiple data types


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

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


Post a Comment