format specifiers quick question

This is a discussion on format specifiers quick question within the C Programming forums, part of the General Programming Boards category; Can someone please tell me what the following format specifier does exactly? I understand what the specifiers in general mean, ...

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    5

    format specifiers quick question

    Can someone please tell me what the following format specifier does exactly? I understand what the specifiers in general mean, and how to use them , but I have never seen this one before

    printf("%1X",x & 0x01 << j ? 1 : 0) ;


    I get that the big X means unsigned hex, but what does the number in front of it mean?

    thanks

  2. #2
    Registered User
    Join Date
    Jun 2003
    Posts
    13
    I guess its just like %3d, %4d...we write for decimals...

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Most format attributes can be mixed and matched between flags, you can find details here so I don't have to retype it all.
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. quick question (adding characters)
    By Cactus in forum C Programming
    Replies: 2
    Last Post: 09-24-2005, 04:54 PM
  2. very quick question.
    By Unregistered in forum C++ Programming
    Replies: 7
    Last Post: 07-24-2002, 04:48 AM
  3. quick question
    By Unregistered in forum C++ Programming
    Replies: 5
    Last Post: 07-22-2002, 05:44 AM
  4. Quick Question Regarding Pointers
    By charash in forum C++ Programming
    Replies: 4
    Last Post: 05-04-2002, 12:04 PM
  5. Quick question: exit();
    By Cheeze-It in forum C Programming
    Replies: 6
    Last Post: 08-15-2001, 06:46 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21