New course! Every coder should learn Generative AI!
Try a free lesson+ 11
What is the return type of printf() and scanf() functions and what does they return?
5 Answers
+ 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
+ 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
+ 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..
+ 1
ptintf returns output, whereas scanf gives input