How to use Scanf in C ("TAMIL");PART4
Автор: Tamil Cybersecurity Tutorials
Загружено: 2019-01-14
Просмотров: 33
scanf function
We use the scanf() function to get input data from keyboard.
Format of scanf() function.
scanf("control string", &variable1, &variable2, ...);
The control string holds the format of the data being received. variable1, variable2, ... are the names of the variables that will hold the input value.
The & ampersand symbol is the address operator specifying the address of the variable where the input value will be stored.
Lets explore some code to see scanf in action.
%c
Read a character
%d
Read a decimal integer
%ld
Read a long integer
%hd
Read a short integer
%e
Read a floating point value
%f
Read a floating point value
%lf
Read a double number
%Lf
Read a long double number
%g
Read a floating point value
%h
Read a short integer
%i
Read a decimal, hexadecimal or octal integer
%o
Read an octal integer
%s
Read a string
%u
Read an unsigned decimal integer
%x
Read a hexadecimal integer
%[..]
Read a string of word(s)
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: