getch & scanf.difference.

Discussion in 'C' started by spoddar66, May 27, 2010.

  1. spoddar66

    spoddar66 New Member

    Joined:
    May 25, 2010
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    0
    What is the difference between getch & scanf?
     
  2. pkbis28

    pkbis28 New Member

    Joined:
    May 25, 2010
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    0
    By the getch we can enter only one char & this is not displayed to stdout and do't wait for the enter key but by the scanf we can enter more than one data type of different data type and it needs to enter a enter key to enter .Actually
    getch() can get single characteralone and waits for user to hit enter key.where as scanf can get any data type [char, string,int,long] and waits for user to hit enter
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice