questions about scanf

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kirtikjr
    New Member
    • Nov 2008
    • 2

    #1

    questions about scanf

    plz tell me what does line means:

    scanf ("%[^\n]s",char);

    and some variants like: "%*s" and "%*s%s"
    plz correct if any thing is wrong..
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    The first argument for scanf(), printf(),etc is a char string containing code characters that have meaning to the function. All of these codes are in any book on C.

    Comment

    • newb16
      Contributor
      • Jul 2008
      • 687

      #3
      Originally posted by kirtikjr
      plz tell me what does line means:

      scanf ("%[^\n]s",char);

      and some variants like: "%*s" and "%*s%s"
      plz correct if any thing is wrong..
      The keyword for google is "[printf] format specifier".
      First one afaik is "everything except \n" , what is %*s - I have no idea.

      Comment

      Working...