This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug manual/14695] Wrong printf("%3s"...) Example --- manual subsection "12.12.6 Other Output Conversions"


http://sourceware.org/bugzilla/show_bug.cgi?id=14695

R N Alx <lascania at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |

--- Comment #15 from R N Alx <lascania at gmail dot com> 2012-10-11 15:03:44 UTC ---
I want to output only 5characters from a 10character string

char str[] = "0123456789"

Which printf() call will do that job ?

I. printf("%5s", str)

or II. printf("%.5s", str)

Now lets see how big experts you are.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]