Thread: Question about format specifiers in C

  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    3

    Question about format specifiers in C

    Hello,

    Can someone explain me what does this mean?

    "40[^\"], %*c"

    Thanks

  2. #2
    Registered User
    Join Date
    Apr 2006
    Posts
    2,149
    I think it's missing an initial %.

    If so then it is meant to read up to 40 character untill the next ". Then it ignores a comma, whitespace character, and any character in that order.
    It is too clear and so it is hard to see.
    A dunce once searched for fire with a lighted lantern.
    Had he known what fire was,
    He could have cooked his rice much sooner.

  3. #3
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    and so it will have a problem - because when parsing of %40[^\"] stops - most likely next not read character in the stream will be " and not , expected by the format - so the parsing will stop there
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 12:14 PM
  2. Program format Question
    By deadhippo in forum C Programming
    Replies: 0
    Last Post: 05-13-2008, 10:33 PM
  3. gcc/borland and sscanf format specifiers
    By Sargnagel in forum C Programming
    Replies: 2
    Last Post: 01-24-2003, 06:40 PM
  4. %e format question
    By sewilli in forum C Programming
    Replies: 2
    Last Post: 11-07-2002, 07:35 PM
  5. Declaring the format function
    By GaPe in forum C Programming
    Replies: 1
    Last Post: 09-11-2002, 09:10 AM