Basic Programming Language pdf Online Test - Set 18 - ObjectiveBooks

Basic Programming Language pdf Online Test - Set 18

Practice Test: Question Set - 18


1. The process of extracting the relevant attributes of an object is known as
    (A) Polymorphism
    (B) Inheritance
    (C) Abstraction
    (D) Data hiding

2. Two or more arrays whose elements are related by their position (subscript) in the arrays are called _______ arrays
    (A) Horizontal
    (B) Paired
    (C) Parallel
    (D) Related

3. When two types are used in a function template and one is labeled T, the other
    (A) Must also be named T
    (B) Must be named U
    (C) Can be any legal C++ identfier
    (D) It is illegal to have two types

4. A compound statement does not consist of
    (A) A single statement
    (B) Other compound statements
    (C) Expression statements
    (D) Control statements

5. The exclusive OR operator gives the result 1 when
    (A) Both the bits are 0
    (B) One bit is 0 and the other is 1
    (C) Both the bits are 1
    (D) No hard and fast rule

6. Assuming the following three operators appear in an expression (without parentheses), which of the operators will be performed first?
    (A) &&
    (B) !
    (C) ||
    (D) None of the above

7. You _______ write your own container classes
    (A) Must
    (B) May
    (C) Should not
    (D) Must not

8. In C++, you use _______ to perform standard input and output operations
    (A) Characters
    (B) Sequences
    (C) Streams
    (D) Tests

9. A function in a derived class that has the same name as a function in the parent class ________
    (A) Will cause an error message to display
    (B) Will override the base class function
    (C) Will be overridden by the base class function
    (D) Will execute immediately after the base class function executes

10. A fundamental type such as int or double is a _______
    (A) Programmer-defined type
    (B) Complex type
    (C) Non-scalar type
    (D) Scalar type

11. Which of the following is the extraction operator?
    (A) >> 
    (B) << 
    (C) //
    (D) /*

12. You can override a class's inherited access to make an individual member's access more ________
    (A) Liberal
    (B) Conservative
    (C) Either (a) or (b)
    (D) Neither (a) nor (b)

13. When an argument is passed by reference,
    (A) A variable is created in the function to hold the argument's value
    (B) The function cannot access the argument's value
    (C) A temporary variable is created in the calling program to hold the argument's value
    (D) The function accesses the argument's original value in the calling program

14. Which of the following flowchart symbols represents the if selection structure?
    (A) Diamond
    (B) Hexagon
    (C) Oval
    (D) Parallelogram

15. Which is true?
    (A) Coincidental cohesion is stronger than procedural cohesion
    (B) Logical cohesion is stronger than coincidental cohesion
    (C) Sequential cohesion is weaker than temporal cohesion
    (D) The weakest cohesion is functional

Show and hide multiple DIV using JavaScript View All Answers

 Next Tests:

    Blogger Comment
    Facebook Comment