/*
Author : ITVoyagers (https://itvoyagers.in/)
Date :25th December 2018
Description : Programs to understand the basic data types and I/O.
*/
#include<stdio.h>
void main()
{
int i;
char c;
float f;
double d;
char s[10]; //string
/********* Printing size of Datatypes **********/
printf("size of number: %d n",sizeof(int));
printf("size of character: %d n",sizeof(char));
printf("size of float: %d n",sizeof(float));
printf("size of double: %d n",sizeof(double));
printf("size of string for this program: %d nn",sizeof(s));
/******** Accepting values from user *********/
printf("Enter a number: ");
scanf("%d",&i);
printf("Enter a character: ");
scanf(" %c",&c);
printf("Enter a float: ");
scanf("%f",&f);
printf("Enter a double: ");
scanf("%lf",&d);
printf("Enter a string: ");
scanf("%s",&s);
/******** Printing Accepted values *********/
printf("nEntered number: %dn",i);
printf("Entered character: %cn",c);
printf("Entered float: %fn",f);
printf("Entered double: %lfn",d);
printf("Entered string: %s",s);
}