problem with quix chapter 4

This is a discussion on problem with quix chapter 4 within the C++ Programming forums, part of the General Programming Boards category; Hello, I don't understand 2 answers on this quix ( Cprogramming.com - Tutorials - C++ Programming Quiz - Functions ) ...

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    230

    problem with quix chapter 4

    Hello,

    I don't understand 2 answers on this quix (Cprogramming.com - Tutorials - C++ Programming Quiz - Functions)

    On question 1 I thought the right answer was A but it seems to be B.
    I can't see why.

    On question 3 I thought the right answer was D but it seems to be C
    But the text said return-type function_name ( arg_type arg1, ..., arg_type argN );

    C don't have a return-type and D has.
    Why is C then the good answer.

    Regards,

    Roelof

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    23,641
    Quote Originally Posted by roelof
    On question 1 I thought the right answer was A but it seems to be B.
    I can't see why.
    The missing semi-colon.

    Quote Originally Posted by roelof
    On question 3 I thought the right answer was D but it seems to be C
    But the text said return-type function_name ( arg_type arg1, ..., arg_type argN );

    C don't have a return-type and D has.
    Why is C then the good answer.
    Because that question asks you to identify the function call, not the function declaration/prototype.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    230
    hello laserlight.

    Thank you for the answers.
    Now I understand it i can go on with the "course"

    Roelof

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 10:22 AM
  2. please help with binary tree, urgent.
    By slickestting in forum C Programming
    Replies: 2
    Last Post: 07-22-2007, 07:55 PM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM

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