![]() |
VOOZH | about |
Printing an Integer in C is one of the most basic tasks. Input and output of the elements are essential for taking input from the user and then giving the output to the user. Here we are going to take an integer as input from the user with the help of the scanf() function and print that integer with the help of the printf() function in C language.
Approach:
Syntax:
printf("%d", variableOfIntType);
Below is the C program to print the integer value:
Printing Integer value 5
Approach:
Syntax:
scanf("%d", &variableOfIntType);
Below is the C program to read integer values in C:
Output:
Enter the integer: 10 Entered integer is: 10