Thread: Scanf sometimes do not stop for input

  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    134

    Scanf sometimes do not stop for input

    Sometimes I found that scanf doesn't executed, after some research I found that it takes EOF from and and does not stop at the scanf statement. Can anybody please answer my these few queries?

    1. then why it stops most of the time to get input?
    2. when it stops and when it doesn't?

    NB: I found these problems working with fork(), pipe, and dup.

  2. #2
    Registered User
    Join Date
    May 2010
    Location
    Naypyidaw
    Posts
    1,314
    1. then why it stops most of the time to get input?
    2. when it stops and when it doesn't?
    Can you post example code that demonstrate these two questions?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. scanf() consideres useless
    By Snafuist in forum C Programming
    Replies: 15
    Last Post: 02-18-2009, 08:35 AM
  2. when a while loop will stop ?
    By blue_gene in forum C Programming
    Replies: 13
    Last Post: 04-20-2004, 03:45 PM
  3. Please help debug
    By Wexy in forum C Programming
    Replies: 2
    Last Post: 11-11-2002, 12:40 AM
  4. help with switch statements
    By Wexy in forum C Programming
    Replies: 3
    Last Post: 11-06-2002, 05:44 PM
  5. scanf - data is "put back" - screws up next scanf
    By voltson in forum C Programming
    Replies: 10
    Last Post: 10-14-2002, 04:34 AM