What is the return type of printf() and scanf() functions and what does they return? | Sololearn: Learn to code for FREE!
+ 11

What is the return type of printf() and scanf() functions and what does they return?

17th Nov 2018, 5:43 PM
Jakaria Hussain
Jakaria Hussain - avatar
5 Antworten
+ 27
It's depends on successful return of the each statement..U can refer these codes that gives u better understanding I think soo... https://code.sololearn.com/cAt6ufOQpv0v/?ref=app https://code.sololearn.com/cvim84N3xiMZ/?ref=app
17th Nov 2018, 5:59 PM
Jasmine Shaik
Jasmine Shaik - avatar
+ 12
scanf function return the no. of successful reading a value as : printf("%d",scanf("%d",&a) ); // return 1 printf("%d",scanf("%d%d",&a,&b) ); // return 2 and printf function return the no. of character print: printf("%d",printf("\nhello") ); // return hello6
17th Nov 2018, 6:23 PM
Shruti
Shruti - avatar
+ 3
With the help of printf() you can display your code in the screen and with the help of scanf() you can give the input in your code..
18th Nov 2018, 2:41 PM
Microsof Login
Microsof Login - avatar
+ 1
ptintf returns output, whereas scanf gives input
27th Nov 2018, 11:20 AM
Saswat Pradhan
Saswat Pradhan - avatar