couple hmwk questions...

This is a discussion on couple hmwk questions... within the C Programming forums, part of the General Programming Boards category; Thanks for any input 1. what is the purpose of the exclamation mark in the front of the function feof() ...

  1. #1
    slimwboozha
    Guest

    couple hmwk questions...

    Thanks for any input

    1. what is the purpose of the exclamation mark in the front of the function feof() ??

    2. identify what each of the following items must be and indicate how you know... list[6] jump(4)

    3. what is the potentional problem changing the vaule of element number 50 in an array that was set to have a size of 50 when it was declared??

    thanks again...just having trouble answering this stuff....

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    162
    1) I don't know what that is about
    2)list[6] must be an array because it has the element number inside the brackets. jump(4) is most likely a function call because it is passing a variable.
    3)you can't change the #50 element as in array[50], because the array starts with 0 and goes to 49, making 50. If you tried to access the 50 element it would probably cause a GPF or somehting similar.

    You should probably try to find out the answers to these questions in a book or asking somebody in your class, but I don't mind helping you if you learn something.

  3. #3
    .........
    Join Date
    Nov 2002
    Posts
    303
    To answer your first question, I have never used feof() but the man page says.
    Code:
    The  function feof tests the end-of-file indicator for the
           stream pointed to by stream, returning non-zero if  it  is
           set.
    So !feof(input) must mean that the end-of-file indicator wasn't set. Since only zero is non-zero and ! infront of anything indicates zero(false).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Couple of Questions
    By toonlover in forum Windows Programming
    Replies: 10
    Last Post: 07-14-2006, 01:04 AM
  2. Couple of simple directdraw questions.
    By Deo in forum Game Programming
    Replies: 3
    Last Post: 05-25-2005, 07:55 AM
  3. Studying for Final, Couple Questions...
    By stewade in forum C Programming
    Replies: 4
    Last Post: 05-10-2004, 05:02 PM
  4. A couple of Questions
    By johnnabn in forum C++ Programming
    Replies: 4
    Last Post: 02-24-2003, 09:10 PM
  5. A couple of PowerPoint questions.
    By sean in forum Tech Board
    Replies: 2
    Last Post: 01-27-2003, 04:26 AM

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