Test questions for C++....help!

This is a discussion on Test questions for C++....help! within the C++ Programming forums, part of the General Programming Boards category; 1) What is the header file used in programs that mix C and C++ I/O? a) stdio.h b) stdlib.h c) ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    18

    Test questions for C++....help!

    1) What is the header file used in programs that mix C and C++ I/O?

    a) stdio.h
    b) stdlib.h
    c) stdiostream.h

    2) A member function can be declared static if it does not access _____ class members.

    a) public
    b) private
    c) non-static
    d) global

    3) How many public sections are required in a class for the class to be useful by a client program?

    a) 0 b) 1 c) 2 d) 3 e) more than 3

    4) Is the following code fragment correct? Yes or no.

    enum cars{Ford, Chrysler, GM} make;
    make = GM
    cout<<"Car is "<<(int)make<<endl;

    5) What does the following code fragment display?

    int temp[5] = {10,19,23,8,9};
    int *p;
    p = temp;
    for(int i=5; i<15; i+=2)
    cout<<*(p+ (i%5))<<endl;

    a) 23 10 9 8 19
    b) 10 23 9 19 8
    c) Nothing because it won't compile
    d) 9 19 8 10 23
    e) 23 9 19 8 10

    .......more questions to come. thanks for the help.

  2. #2
    Registered User
    Join Date
    Jan 2002
    Posts
    18
    These are not homework, but study questions for a challenge exam. I can not find them in my book and the website where the answers are located has been down for a week. I am just asking for help for the questions that I can't find. School isn't even in...how could they be homework questions?!?

  3. #3
    Registered User Fool's Avatar
    Join Date
    Aug 2001
    Posts
    335
    So what have you been doing all semester instead of paying attention? I don't even know C/C++ but I do know a few of those questions.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Computer Programmer Aptitude Battery Test (CPAB)
    By scotty101 in forum General Discussions
    Replies: 40
    Last Post: 02-22-2010, 11:49 PM
  2. Newbie needs help..
    By xpress urself in forum C++ Programming
    Replies: 3
    Last Post: 07-26-2007, 08:22 PM
  3. My C++ test is COMING!!...
    By [Z-D] in forum C++ Programming
    Replies: 52
    Last Post: 12-01-2006, 08:02 PM
  4. Resource ICONs
    By gbaker in forum Windows Programming
    Replies: 4
    Last Post: 12-15-2003, 07:18 AM
  5. Bitwise Test Questions
    By Mister C in forum C Programming
    Replies: 9
    Last Post: 11-27-2002, 06:06 PM

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