Use of scanf, getchar and putchar | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Use of scanf, getchar and putchar

I am starter in coding I am learning in c please tell me use of scanf getchar and putchar. Thank you

17th Apr 2020, 11:12 AM
Kavya Mittal
Kavya Mittal - avatar
2 Answers
+ 1
putchar() function is used to write a character on standard output but getchar() function is used to get/read a character from keyboard input; scanf () function reads formatted data from keyboard.
17th Apr 2020, 11:44 AM
Ahmed Ben Larbi
Ahmed Ben Larbi - avatar
+ 4
They all are used to get input from user except putchar() which displays a single character on console.
17th Apr 2020, 11:15 AM
Arsenic
Arsenic - avatar