- 1
What is ment by %d,%f,%c.
4 Answers
+ 4
"What is %d %f %c"?
In regards to C language tutorial, the course you are enrolled in,
Those are format/conversion specifiers that defines type of data to be read in or printed as output. More about format/conversion specifiers, check these out
http://www.cplusplus.com/reference/cstdio/scanf/
http://www.cplusplus.com/reference/cstdio/printf/
P.S. I see you wondered what "tags" is, so allow me to introduce you ...
https://code.sololearn.com/W3uiji9X28C1/?ref=app
0
%d - used for integer value
%f - used for float value
%c - used for a character value
when displaying on the screen
0
In C,
%d represents integer values
%f for float values and
%c for character values
0
All are format specifiers
%d represents working with int
%f represents working with float
%c represents working with char
int occupies 2 bytes of memory
float occupies 4 bytes of memory
char occupies 1 byte of memory
Any function which is using these formatspecfiers is caaled as formatted functions
Ex : printf(); scanf();
Functions which are not using the formatspecifiers are called as unformatted functions
Ex: puts(); gets(); putchar(); getchar(); putc(); getc()