Prepare for your Next Interview
This is a discussion on What does printf function returns? within the C and C++ forums, part of the Software Development category; I mean that it may return whether how many no of variables printed or how many bytes of variables to be printed....
|
|||
|
Re: What does printf function returns?
printf function is library function and and you can also include own library function in c language using header file.
printf function does not return any value not even void. |
|
|||
|
Re: What does printf function returns?
printf function return the total number of characters (or can say bytes) to be printed on the screen.It doesn't return number of variables.
As a proof you can compile below progam and run it will return 9 #include<stdio.h> void main() { int i=0,j=100,z; z=printf("i=%d j=%d",i,j); printf("%d",z); } |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I have 4 million row but mapping returns only 400000 rows | palakpari | Data Warehousing | 1 | 07-03-2007 02:09 AM |
| printf used along with sleep | sarith | Unix/Linux | 1 | 06-16-2007 05:49 PM |
| Query that returns all responsibilities of a function | JobHelper | Oracle | 0 | 01-04-2007 09:46 AM |
| Printtextscreen and printf | fred | C and C++ | 1 | 07-13-2006 10:52 PM |
| Heard about different forms of printf and scanf | joel | C and C++ | 3 | 06-29-2006 02:26 PM |