Answer:
See explanation
Explanation:
//Include the
//required header files.
#include <stdio.h>
//Define the
//main() function.
int main(void) {
//Declare the
//required variables.
char input_char;
int input_int;
double input_double;
char input_string[100];
//Prompt the user
//to enter an integer.
printf("Enter integer: ");
//Read and store
//the integer.
scanf("%d", &input_int);
//Prompt the user
//to enter a double value.
printf("Enter double: ");
//Read and store
//the double value.
scanf("%lf", &input_double);
//Prompt the user
//to enter a character.
printf("Enter character: ");
//Read and store
//the character.
scanf(" %c", &input_char);
//Prompt user to
//enter the string
printf("Enter string: ");
//Read and
//store the string.
scanf("%s", input_string);
//(1)
//Display the values.
printf("%d %lf %c %s\n",
input_int, input_double,
input_char, input_string);
//(2)
//Display the values
//in reverse order.
printf("%s %c %lf %d\n",
input_string, input_char,
input_double, input_int);
//(3)
//Cast the double to
//an integer and display it.
printf("%lf cast to an integer is %d",
input_double, (int)(input_double));
//Return from the
//main() function.
return 0;
}