Thread: quick printf question

  1. #1
    Registered User
    Join Date
    Sep 2010
    Posts
    28

    quick printf question

    http://i51.tinypic.com/ejabg0.jpg

    i'm doing this program and understand it except for the printf at the end. why is there a %4i$14i there?

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    The 4 and 14 are field width specifiers. The number will be put into a space of it's own, that is 4 or 14 char's wide.

    (and yes, you can align the number within those fields, if you want, using the - sign )

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple XOR Program
    By dolfaniss in forum C Programming
    Replies: 8
    Last Post: 05-24-2010, 01:27 PM
  2. please help me im dieing
    By phatomphreak in forum C Programming
    Replies: 9
    Last Post: 03-05-2010, 05:11 PM
  3. Replies: 2
    Last Post: 03-05-2009, 10:25 AM
  4. I have some questions :(
    By geekrockergal in forum C Programming
    Replies: 19
    Last Post: 02-01-2009, 09:44 AM
  5. making it portable.....?
    By ShadeS_07 in forum C Programming
    Replies: 11
    Last Post: 12-24-2008, 09:38 AM