Subscribe link: https://www.youtube.com/c/JDconvergeAcademy?sub_confirmation=1
C Input Output (I/O)
In this tutorial, you will learn to use scanf() function to take input from the user, and printf() function to display output to the user.
In C programming, printf() is one of the main output function. The function sends formatted output to the screen. For example
Format placeholder specification
Formatting takes place via placeholders within the format string. For example, if a program wanted to print out a person’s age, it could present the output by prefixing it with “Your age is “. To denote that we want the integer for the age to be shown immediately after that message, we may use the format string:
printf(“Your age is %d”, age);
The syntax for a format placeholder is