Thread: Array help

  1. #1
    Unregistered
    Guest

    Array help

    a) What is a prototype? What is the purpose of a prototype?

    b) What is a function? What are the benefits of using functions?

    c) Notice the use of #define at the beginning of the code? Why is this used? What other compiler directives are there?
    What is the difference between a compiler directive and a keyword?

    d) Why is it okay to substitute a character array (string) for a char *?

    e) The function "int asknumber(char *)" returns the number as opposed to taking it as an argument. Why couldn't we use
    use "void asknumber(char *, int)" ? Is there a way that we could return the integer using this format? (Hint: Why does
    this method work in " void ask(char *, char *)" ?

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    1) What is homework?
    2) Why are you posting homework on this board?
    3) Is this board meant for homework?
    4) Did you read the FAQ?
    5) Did you read the "READ THIS FIRST"?
    6) If you've got this far, and still posted this, should you expect much flaming and criticism from the regular posters here?
    7) Should you act surprised when you are flamed?
    8) Is this a flame?

    Quzah.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 05-29-2009, 07:25 PM
  2. Replies: 6
    Last Post: 11-09-2006, 03:28 AM
  3. [question]Analyzing data in a two-dimensional array
    By burbose in forum C Programming
    Replies: 2
    Last Post: 06-13-2005, 07:31 AM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. Quick question about SIGSEGV
    By Cikotic in forum C Programming
    Replies: 30
    Last Post: 07-01-2004, 07:48 PM