C program to print an user defined data of a integer variable

C program to print an user defined data of a integer variable

 How to take an "int" type user input in C language? A user can take input using scanf function, and the number is printed on screen using printf.

C program to print user given input (Integer) :



#include <stdio.h>

int main()
{
int a;

printf("Enter an integer : ");
scanf("%d", &a);

printf("The integer is : %d\n", a);

return 0;
}

Output :