Thread: format specifiers quick question

  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,897
    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, 03:54 PM
  2. very quick question.
    By Unregistered in forum C++ Programming
    Replies: 7
    Last Post: 07-24-2002, 03:48 AM
  3. quick question
    By Unregistered in forum C++ Programming
    Replies: 5
    Last Post: 07-22-2002, 04:44 AM
  4. Quick Question Regarding Pointers
    By charash in forum C++ Programming
    Replies: 4
    Last Post: 05-04-2002, 11:04 AM
  5. Quick question: exit();
    By Cheeze-It in forum C Programming
    Replies: 6
    Last Post: 08-15-2001, 05:46 PM