Computer Science :: All Aptitude Test ::

1.Which of the following cannot be a friend ?
A. Function
B. Class
C. Object
D. Function

2.Why references are different from pointers ?
A. A reference cannot be made null
B. A reference cannot be changed once initialized
C. No extra operator is needed for dereferencing of a reference
D. A reference cannot be made null

3.Which of the following provides a programmer with the facility of using object of a class inside other classes ?
A. Inheritance
B. Composition
C. Abstraction
D. Inheritance

4.How many types of polymorphism are there in C++ ?
A. 1 Type
B. 2 Types
C. 3 Types
D. 1 Type

5.How run-time polymorphisms are implemented in C++ ?
A. Using Inheritance
B. Using Virtual functions
C. Using Templates
D. Using Inheritance

6.How compile-time polymorphisms are implemented in C++ ?
A. Using Inheritance
B. Using Virtual functions
C. Using Templates
D. Using Inheritance

7.Which of the following is an abstract data type ?
A. int
B. float
C. class
D. int

8.Which concept means the addition of new components to a program as it runs ?
A. Data hiding
B. Dynamic binding
C. Dynamic loading
D. Data hiding

9.Which of the following explains the overloading of functions ?
A. Virtual polymorphism
B. Transient polymorphism
C. Ad-hoc polymorphism
D. Virtual polymorphism

10.Which of the following approach is used by C++ ?
A. Top-down
B. Bottom-up
C. Left-right
D. Top-down

11.Which operator is overloaded for a cout object ?
A. >>
B. <<
C. <
D. >>

12.Which of the following cannot be used with the virtual keyword ?
A. Class
B. Member functions
C. Constructors
D. Class

13.Which concept is used to implement late binding ?
A. Virtual functions
B. Operator functions
C. Constant functions
D. Virtual functions

14.Which of the following is correct ?
A. C++ allows static type checking
B. C++ allows dynamic type checking.
C. C++ allows static member function to be of type const.
D. C++ allows static type checking

15.Which of the following supports the concept that re-usability is a desirable feature of a language ?
A. It reduces the testing time
B. It reduces maintenance cost
C. It decreases the compilation time
D. It reduces the testing time

16.Which of the following is a static polymorphism mechanism ?
A. Function overloading
B. Operator overloading
C. Templates
D. Function overloading

17.Which of the following is not a type of inheritance ?
A. Multiple
B. Multilevel
C. Distributive
D. Multiple

18.What happens if a class does not have a name ?
A. It will not have a constructor
B. It will not have a destructor
C. It is not allowed
D. It will not have a constructor

19.Which members are inherited but are not accessible in any case ?
A. Private
B. Public
C. Protected
D. Private

20.Which of the following is correct ?
A. Friend functions can access public members of a class
B. Friend functions can access protected members of a class
C. Friend functions can access private members of a class
D. Friend functions can access public members of a class

21.Which of the following is correct in C++ ?
A. Classes cannot have protected data members
B. Structures can have member functions
C. Class members are public by default
D. Classes cannot have protected data members

22.Which of the following is used to make an abstract class ?
A. By using virtual keyword in front of a class declaration
B. By using an abstract keyword in front of a class declaration
C. By declaring a virtual function in a class
D. By using virtual keyword in front of a class declaration

23.Which of the following is correct ?
A. A class is an instance of its objects
B. An object is an instance of its class
C. A class is an instance of the data type that the class have
D. A class is an instance of its objects

24.Which operator is overloaded for a cout object ?
A. >>
B. <<
C. <
D. >>

25.Which of the following cannot be used with the virtual keyword ?
A. Class
B. Member functions
C. Constructors
D. Class

26.Which concept is used to implement late binding ?
A. Virtual functions
B. Operator functions
C. Constant functions
D. Virtual functions

27.Which of the following is correct ?
A. C++ allows static type checking
B. C++ allows dynamic type checking.
C. C++ allows static member function to be of type const.
D. C++ allows static type checking

28.Which of the following supports the concept that re-usability is a desirable feature of a language ?
A. It reduces the testing time
B. It reduces maintenance cost
C. It decreases the compilation time
D. It reduces the testing time

29.Which of the following is a static polymorphism mechanism ?
A. Function overloading
B. Operator overloading
C. Templates
D. Function overloading

30.What is the correct syntax of declaring array of pointers of integers of size 10 in C++ ?
A. int arr = new int[10];
B. int **arr = new int*[10];
C. int *arr = new int[10];
D. int arr = new int[10];


Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers