Question:
What are returned by printf(), scanf() functions,if they return anything means what are that?
Answer:
Return type of printf() and scanf() is integer. scanf() returns the no.of variables used and printf() returns the total no.of bytes. Source: CoolInterview.com
return type of scanf and printf is int
scanf returns no of valid inputs you are getting inside it printf returns no of characters as well as formatspecifier inside it Source: CoolInterview.com
Answered by: balu | Date:
| Contact balu
both the printf and scanf functions return some value.this can be checked readily by assigning them to a variable.it returns value depending on the variable to which it is assigned Source: CoolInterview.com
Answered by: sreekanth reddy | Date:
| Contact sreekanth reddy
printf and scanf are library functios used in "c language". printf is used to print the o/p on the monitor or display the o/p. scanf is used to read the input values into adrress of that variable from the user. printf and scanf returns the values depend on "datatype". Source: CoolInterview.com
Answered by: sreelatha | Date:
| Contact sreelatha
sanf and printf are both library functions printf gives the output so it gives and calculate the total number of bytes which must be a integer value. sanf calculates the total number of valid inputs so it must be a int. Source: CoolInterview.com
Answered by: pritam chakraborty | Date:
| Contact pritam chakraborty
printf and scanf are library functios used in "c language". printf is used to print the o/p on the monitor or display the o/p. scanf is used to read the input values into adrress of that variable from the user. printf and scanf returns the values depend on "datatype".
Source: CoolInterview.com
Answered by: veena | Date:
| Contact veena
scanf() return the no. of arguments reads sucessfully.
ex- scanf("%d",&x); is 1 and printf() returns the no. of character to be printed. Source: CoolInterview.com
Answered by: bharat biswal,bhubaneswar | Date: 1/15/2008
| Contact bharat biswal,bhubaneswar
printf is used to display the values of variables on screen according to its format specifier. scanf is used to read the values that are provided by user through keyboard and store these values in variables. printf return the value that it successfully print on screen. similarly scanf return that value that it read successfully. Source: CoolInterview.com
Answered by: dheeraj sharma | Date: 1/16/2008
| Contact dheeraj sharma
Both "printf()" and "sacnf()" returns the integer values.It returns no of values used;e.g main() { int i=printf("hello"); printf("String Lengeth = %d",i); } Source: CoolInterview.com
Answered by: Narendra Kangralkar | Date: 9/20/2009
| Contact Narendra Kangralkar
what is the output of main() { int i; i=printf("hello"); printf(i); } Source: CoolInterview.com
Answered by: sai | Date: 2/11/2010
| Contact sai
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|