Scanf sometimes do not stop for input

This is a discussion on Scanf sometimes do not stop for input within the C Programming forums, part of the General Programming Boards category; Sometimes I found that scanf doesn't executed, after some research I found that it takes EOF from and and does ...

  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, 07: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-10-2002, 11:40 PM
  4. help with switch statements
    By Wexy in forum C Programming
    Replies: 3
    Last Post: 11-06-2002, 04: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21