Search This Blog

Friday, August 12, 2016

How to use char, float, double types of variable

            This is a simple program, where I just want to create a program of variable types, like char, float, double assigns each a value & there output;


               #include <stdio.h>
               int main()
        {
              char X; float Y; double Z;

              X = 'A';
              Y = 100.57;
              Z = 120.0057;

             printf(" \n The value of X is: %c \n", X);
             printf(" \n The value of Y is: %f \n", Y);
             printf(" \n The value of Y is: %f \n", Z);

             return 0;
    }



                               
Output

No comments:

Post a Comment