Computer Based Test C++ Programming - Set 05 - ObjectiveBooks

Computer Based Test C++ Programming - Set 05

Practice Test: Question Set - 05


1. How do we declare an abstract class?
    (A) By providing at least one pure virtual method (function signature followed by ==0;) in a class
    (B) By declaring at least one method abstract using the keyword ‘abstract’ in a class
    (C) By declaring the class abstract with the keyword ‘abstract’
    (D) It is not possible to create abstract classes in C++

2. An inverted file
    (A) Locates information about data in small files that are maintained apart from actual data record
    (B) A file which stores opposite records
    (C) A file which stores information about records of a system
    (D) None of above

3. Which of the following is not an advantage of secondary memory?
    (A) It is cost-effective
    (B) It has large storage capacity
    (C) It has highest speed
    (D) It is easily portable

4. Which of the following is not a file operation?
    (A) Repositioning
    (B) Truncating
    (C) Appending
    (D) None of above

5. What happens when a pointer is deleted twice?
    (A) It can abort the program
    (B) It can cause a failure
    (C) It can cause an error
    (D) It can cause a trap

6. Expression C=i++ causes
    (A) Value of i assigned to C and then i incremented by 1
    (B) i to be incremented by 1 and then value of i assigned to C
    (C) Value of i assigned to C
    (D) i to be incremented by 1

7. The statement i++; is equivalent to
    (A) i = i + i;
    (B) i = i + 1;
    (C) i = i – 1;
    (D) i –;

8. Which of the following library function below by default aborts the program?
    (A) Terminate()
    (B) end()
    (C) Abort()
    (D) exit()

9. Value of ix+j, if i, j are integer type and ix long type would be
    (A) Integer
    (B) Float
    (C) Long integer
    (D) Double precision

10. Which of the following below can perform conversions between pointers to related classes?
    (A) a.A. cast_static
    (B) b.B. dynamic_cast
    (C) c.c. static_cast
    (D) d.D. cast_dynamic

Show and hide multiple DIV using JavaScript View All Answers

 Next Tests:

    Blogger Comment
    Facebook Comment