Prepare for your Next Interview
This is a discussion on Return Value of Functions within the C and C++ forums, part of the Software Development category; All functions return some value. Does it mean that even printf and scanf which are functions in C return some value? If so what is the value returned by these ...
|
|||
|
Return Value of Functions
All functions return some value. Does it mean that even printf and scanf which are functions in C return some value? If so what is the value returned by these functions.
|
| Sponsored Links |
|
|||
|
Re: Return Value of Functions
Yes. As all functions return value so are these functions. I am not aware about scanf but printf returns the number of characters printed by the printf function. Hope we get to know about the return value of more functions in this discussion.
|
|
|||
|
Re: Return Value of Functions
printf returns the number of characters that it prints, whereas scanf returns the number of format specifiers being passed to it in the format string.
Correct me if i am wrong... |
|
|||
|
Re: Return Value of Functions
Quote:
print return no of character printed successfully or negetive value if an error occured. scanf return no of argument that are inputed or read . |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Query to See Functions | joel | SQL | 3 | 02-23-2007 06:33 AM |
| Adding functions to function generator | bvani | WinRunner | 2 | 12-20-2006 04:56 AM |