Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

a c program to display three variables of different data types(float,character,integer)

0 votes
asked Jul 11, 2018 by shepherd (230 points)

4 Answers

0 votes
answered Jul 11, 2018 by manish (170 points)
This code will print integer , float and character type variables ….

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

int main()
{
  int a=10;
  float b=5.23;
  char c= 'x';
printf("integer variable a = %d",a);
printf("\n float variable b = %f",b);
printf("\n character variable c = %c",c);
}
0 votes
answered Jul 12, 2018 by anonymous
#include <stdio.h>
int main()
{
    int a=10;
    float b=10;
    char c=('c');
    printf("%d\n%f\n%c",a,b,c);
}
0 votes
answered Jul 12, 2018 by vesper Niet (180 points)
#include<stdio.h>

    int main(){

         int a=20;

        float b=1.84289;

       char c='Jahid';

      printf(" integer = %d , Float = %.2f  & character = %c ",a,b,c);

      return 0;

}
0 votes
answered Jul 12, 2018 by anonymous
#include<stdio.h>
int main()
{
int a=5;
float b=3.30;
char c='A';
printf("Integer Variable=%d\nFloat Variable =%f\nCharacter Variable=%c\n",a,b,c);
return 0;
}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...