C Programming Language Multiple Choice Test - Set 10 - ObjectiveBooks

C Programming Language Multiple Choice Test - Set 10

Practice Test: Question Set - 10


1. Precedence determines which operator
    (A) Is evaluated first
    (B) Is most important
    (C) Is fastest
    (D) Operates on the largest number

2. Which loop always processes its instructions at least once?
    (A) do-while
    (B) for
    (C) whilewhile
    (D) All of the above

3. Which of the following statements will assign the address of the age variable to the agePtr pointer?
    (A) agePtr = &age;
    (B) agePtr = *age;
    (C) &agePtr = age;
    (D) *agePtr = age;

4. To create and execute a C++ program, you need to have access to
    (A) A C++ compiler
    (B) A C++ translator
    (C) A text editor
    (D) Both (a) and (c)

5. You invoke a function with a function
    (A) Call
    (B) Declaration
    (C) Definition
    (D) Prototype

6. A program can directly access the ________ members of a class
    (A) Hidden
    (B) Private
    (C) Public
    (D) Both (b) and (c)

7. Which of the following is not a programming control structure?
    (A) Repetition
    (B) Selection
    (C) Sequency
    (D) Sorting

8. A function that is prototype as int calculate(int num); may
    (A) Receive an integer variable named num from the main() program
    (B) Receive any integer variable from the main() program
    (C) Either (a) or (b)
    (D) Neither (a) nor (b)

9. You may override the class access specifier for_______
    (A) Public members
    (B) Public and protected members
    (C) Any specific class members you choose
    (D) No class members

10. Inheritance occurs when a class adopts all the traits of ________
    (A) An object
    (B) A parent class
    (C) A variable
    (D) A function

11. A programming structure that contains data and a pointer to the next object is a
    (A) Template
    (B) Class
    (C) Pointer class
    (D) Linked list

12. The string HELLO WORLD needs
    (A) 11 bytes
    (B) 12 bytes
    (C) 10 Bytes
    (D) 8 bytes

13. When using the standard files that come with the C++ compiler, you should surround the header file name with _______
    (A) Square brackets
    (B) Angle brackets
    (C) Parentheses
    (D) Quotes

14. A static data member is given a value
    (A) Within the class definition
    (B) Outside the class definition
    (C) When the program is executed
    (D) Never

15. Which of the following are never inherited?
    (A) Public data members
    (B) Constructor functions
    (C) Void functions
    (D) Overloaded + operators

Show and hide multiple DIV using JavaScript View All Answers

 Next Tests:

    Blogger Comment
    Facebook Comment