C Programming Tutorial Online Practice Test - Set 12 - ObjectiveBooks

C Programming Tutorial Online Practice Test - Set 12

Practice Test: Question Set - 12


1. When the compiler cannot differentiate between two overloaded constructors, they are called ________
    (A) Overloaded
    (B) Destructed
    (C) Ambiguous
    (D) Dubious

2. When a language has the capability to produce new data types, it is said to be
    (A) Reprehensible
    (B) Encapsulated
    (C) Overloaded
    (D) Extensible

3. The standard output stream, which refers to the computer screen, is called
    (A) cin
    (B) cout
    (C) stin
    (D) stout

4. The purpose of a conditional operator is to
    (A) Select one of the two values
    (B) Select the highest of the two values
    (C) Select one of the two values depending on a condition
    (D) Select the more equal of the two values

5. The most efficient data type for a variable that stores the number 4.6e20 is the _______ data type
    (A) Character
    (B) Double
    (C) Float
    (D) Short Integer

6. Assume that a program creates and initializes a Short Integer variable named age and a pointer named agePtr, to which it assigns the address of the age variable. Which of the following statements will assign the number 21 to the age variable?
    (A) age = 21;
    (B) *agePtr = 21;
    (C) agePtr = 21;
    (D) Both (a) and (b)

7. In C++, class definitions are most often
    (A) Stored with each program that uses them
    (B) Stored in a header file that is included in the programs that use them
    (C) Stored in a folder that you paste into every new project
    (D) Retyped for every new project

8. You separate a derived class name from its access specifier with
    (A) A colon
    (B) Two colons
    (C) At least one space
    (D) A semicolon

9. Which of the following, if any, are valid names for variables?
    (A) Class
    (B) Friend
    (C) Void
    (D) None of the above are valid names for variables

10. Which of the following are valid characters for a numeric literal constant?
    (A) A decimal point
    (B) The letter e
    (C) A minus sign
    (D) All of the above

11. When a function includes a throw statement for errors, the call to the potentially offending function should be placed within a _______ block
    (A) Throw
    (B) Try
    (C) Catch
    (D) Scope

12. A function whose purpose is to send messages to other functions is known as a _______
    (A) Dispatcher
    (B) Courier
    (C) Messenger
    (D) Sender

13. The best-written classes have
    (A) All functions private
    (B) All data public
    (C) No functions
    (D) None of the above

14. When you omit parameters from a function call, values can be provided by
    (A) Formal parameters
    (B) Reference parameters
    (C) Overloaded parameters
    (D) Default parameters

15. An identifier in C
    (A) Is a name of a thing such as variable and function
    (B) Is made up of letters, numerals, and the underscore
    (C) Can contain both uppercase and lowercase letters
    (D) All of the above

Show and hide multiple DIV using JavaScript View All Answers

 Next Tests:

    Blogger Comment
    Facebook Comment