Thread: printf field width

  1. #1
    Registered User
    Join Date
    Feb 2009

    printf field width

    hello, I am new to c programming, and now solving some problems from c primer plus. I would like to ask about the printf conversion specifier that prints a string in a field three character wider than the string.
    any help will be greatly appreciated.
    thank you.

  2. #2
    Registered User
    Join Date
    May 2010
    Did you read the documentation for printf()? Pay particular attention to the width and precision specifiers.


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Setting width in printf with a #define macro?
    By noobiept in forum C Programming
    Replies: 6
    Last Post: 06-25-2010, 07:25 AM
  2. Replies: 9
    Last Post: 07-21-2009, 08:52 PM
  3. Replies: 2
    Last Post: 06-07-2009, 08:49 AM
  4. Printf: somehow it changed a structure field.
    By Artemiy in forum C Programming
    Replies: 3
    Last Post: 04-04-2009, 11:27 AM
  5. Field width
    By vandalay in forum C Programming
    Replies: 3
    Last Post: 11-30-2003, 02:50 AM