Advertisement

 /* Write a C program to display multiple variables. */

 #include<stdio.h>

int main( )

{

    char c='V';

    int i=678;

    float f=12.23;

    double d=12.123456789;

    printf("Character = %c\n",c);

    printf("Integer = %d\n",i);

    printf("Float = %f\n",f);

    printf("Double = %lf\n",d);

    return 0;

}


Output:

Character = V

Integer = 678

Float = 12.230000

Double = 12.123457

Back

Post a Comment

0 Comments