Home »
C programs
C scanf() Programs
By IncludeHelp Last updated : March 10, 2024
C - scanf() Function
In C programming language, the scanf() is a standard library function which is defined in stdio.h header file, it is one of the most commonly used functions to take input from the user. The scanf() function is used to read the formatted input from the standard input device (keyboard).
Syntax
scanf("formatted_string", arguments_list);
C scanf() programs/examples
This section contains the C solved programs on scanf() function, practice these programs to learn the concept of standard input in various formats. Each program contains the solved code, output, and explanations.
List of C scanf() Programs
- Input integer, float and character values using one scanf() statement in C.
- Input an integer value and print with padding by Zeros in C
- Input float value and print it with specified digit after decimal point in C
- Input an unsigned integer value using scanf() in C
- Input a hexadecimal value using scanf() in C
- Input octal value using scanf() in C
- Input decimal, octal and hexadecimal values in character variables using scanf() in C
- Input an integer value in any format (decimal, octal or hexadecimal) using '%i' in C
- Input individual characters using scanf() in C
- Read a memory address using scanf() and print its value in C
- Skip characters while reading integers using scanf() in C