C++ Programming Online Practice Test – Set 03

Are you guys looking for computer science MCQ Questions with Answers PDF Free Download as per computer science new exam pattern? You came to the right page. This may assist you to understand and check your knowledge about the Subjects. Students also can take a free test of the Multiple Choice Questions of computer science. Each question has four options followed by the right answer. These computer science MCQ Questions are selected supported by the newest exam pattern.


Q1. Originally ‘C’ was developed as:

(A) System programming language
(B) General purpose language
(C) Data processing language
(D) None of above

Answer:(C) Data processing language


Q2. 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++

Answer: (A) By providing at least one pure virtual method (function signature followed by ==0;) in a class


Q3. Vtables

(A) Creates a static table per class
(B) Creates a static table per object
(C) Creates a dynamic table per class
(D) Creates a dynamic table per object

Answer: (D) Creates a dynamic table per object


Q4. Statement scanf(“%d”,80);

(A) Assign an integer to variable i
(B) Give an error message
(C) Print the value of i
(D) Assign an float to variable i

Answer: (A) Assign an integer to variable i


Q5. Latency time is:

(A) Time taken by read/write head mechanism to position itself over appropriate cylinder
(B) Time taken to transfer a data from memory
(C) Time taken by appropriate sector to come under read/write head
(D) None of above

Answer: (D) None of above


Q6. 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

Answer: (B) A file which stores opposite records


Q7. When class B is inherited from class A, what is the order in which the constructers of those classes are called?

(A) Class A first Class B next
(B) Class B first Class A next
(C) Class B’s only as it is the child class
(D) Class A’s only as it is the parent class

Answer: (A) Class A first Class B next


Q8. If there is more than one statement in the block of a for loop, which of the following must be placed at the beginning and the ending loop block?

(A) parentheses ( )
(B) braces { }
(C) brackets [ ]
(D) arrows < >

Answer: (C) brackets [ ]


Q9. The two types of file structure existing in VSAM file are

(A) Key sequenced structure, entry sequenced structure
(B) Key sequence structure, exit sequenced structure
(C) Entry sequence structure, exit sequenced structure
(D) None of above

Answer: (C) Entry sequence structure, exit sequenced structure


Q10. 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

Answer: (A) It is cost-effective


Q11. In a group of nested loops, which loop is executed the most number of times?

(A) The outermost loop
(B) The innermost loop
(C) All loops are executed the same number of times
(D) Cannot be determined without knowing the size of the loops

Answer: (C) All loops are executed the same number of times


Q12. Which of the following members do get inherited but become private members in child class

(A) Public
(B) Private
(C) Protected
(D) All the above

Answer: (B) Private


Q13. How many copies of a class static member are shared between objects of the class?

(A) A copy of the static member is shared by all objects of a class
(B) A copy is created only when at least one object is created from that class
(C) A copy of the static member is created for each instantiation of the class
(D) No memory is allocated for static members of a class

Answer: (C) A copy of the static member is created for each instantiation of the class


Q14. Which of the following functions below can be used Allocate space for array in memory?

(A) calloc()
(B) malloc()
(C) Realloc()
(D) Both (a) and (b)

Answer: (D) Both (a) and (b)


Q15. Value of a in a = (b = 5, b + 5); is

(A) Junk value
(B) Syntax error
(C) 5
(D) 10

Answer:(B) Syntax error


C++ Programming MCQ – All Set

C++ Programming MCQ Practice Test – Set 01
Computer Programming using C++ Objective Test – Set 02
C++ Programming Online Practice Test – Set 03
Computer Based Test C++ Programming – Set 04
C++ Programming Free Online Test – Set 05

We hope the given computer science Engineering on C++ Programming MCQ Questions with Answers will definitely yield fruitful results. Hope you got enough ideas on the MCQs on C++ Programming. If you have any queries related to computer science Engineering on C++ Programming MCQs Multiple Choice Questions with Answers, drop your questions below and will get back to you in no time.

Leave a Comment