valid call to the function

This is a discussion on valid call to the function within the C++ Programming forums, part of the General Programming Boards category; given the function void mystery(int list[], int size0; and the declaration in t alpha[50];, which of the following is a ...

  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    10

    valid call to the function

    given the function void mystery(int list[], int size0; and the declaration in t alpha[50];, which of the following is a valid call to the function mystery?
    Code:
    a. mystery(alpha[50]);                                 c.  mystery(alpha, 50);
    
    b. mystery(alpha[], 50;                                d. mystery(alpha{50});
    Last edited by Salem; 04-16-2007 at 11:30 PM. Reason: Move the code tags

  2. #2
    Registered User
    Join Date
    Nov 2004
    Location
    Pennsylvania
    Posts
    434
    i'm going to go with c, although it looks like you missed some )'s and such with the other ones
    "Anyone can aspire to greatness if they try hard enough."
    - Me

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    What do you think the answer is and why?

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,892
    Just try to compile them, please. Two aren't even valid C++ syntax, and the third invalid one is a type violation.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  3. Loading files with a function call
    By ulillillia in forum C Programming
    Replies: 6
    Last Post: 04-10-2007, 07:19 PM
  4. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 01:28 PM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM

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