What is ment by %d,%f,%c. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

What is ment by %d,%f,%c.

17th Oct 2021, 8:43 AM
Kiran
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
17th Oct 2021, 8:49 AM
Ipang
0
%d - used for integer value %f - used for float value %c - used for a character value when displaying on the screen
17th Oct 2021, 9:38 AM
Jasy Fabiano
Jasy Fabiano - avatar
0
In C, %d represents integer values %f for float values and %c for character values
17th Oct 2021, 10:40 AM
DIVYA BETHI
DIVYA BETHI - avatar
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()
17th Oct 2021, 4:49 PM
sree harsha
sree harsha - avatar