Thread: fgets and scanf

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    Registered User
    Join Date
    May 2011
    Posts
    32
    Quote Originally Posted by tabstop View Post
    Because they are. Try changing this erroneous line:
    Code:
    printf("\nYou entered: %i", result);
    to something more correct, like
    Code:
    printf("\nYou entered: %i>>result stops here", result);
    Yep, that's what I overlooked, thanks. And why did I overlook it? Because I didn't get a message in the XCode debug window that the program terminated... Strange. That's why I thought it was waiting for input... Silly me!

    EDIT: The program does terminate but after some 30 seconds or so of being idle after the last output...
    Last edited by kkk; 07-29-2011 at 10:14 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. gets(), scanf(), fgets() problem!
    By securetux in forum C Programming
    Replies: 4
    Last Post: 03-27-2011, 02:09 AM
  2. scanf vs fgets?
    By Matus in forum C Programming
    Replies: 65
    Last Post: 11-17-2008, 04:02 PM
  3. what happens after 'fgets' and 'scanf'
    By the bassinvader in forum C Programming
    Replies: 4
    Last Post: 07-30-2006, 03:04 PM
  4. Scanf->Fgets
    By 00Sven in forum C Programming
    Replies: 2
    Last Post: 04-21-2006, 02:39 PM
  5. replacing scanf with fgets
    By guest73 in forum C Programming
    Replies: 8
    Last Post: 09-16-2002, 04:52 AM