Engineering :: All Aptitude Test ::

Hassan
1.What are the formal parameters in C++ ?
A. Parameters with which functions are called
B. Parameters which are used in the definition of the function
C. Variables other than passed parameters in a function
D. Parameters with which functions are called

2.What are the actual parameters in C++ ?
A. Parameters with which functions are called
B. Parameters which are used in the definition of a function
C. Variables other than passed parameters in a function
D. Parameters with which functions are called

3.Which of the following is used for comments in C++ ?
A. // comment
B. /* comment */
C. both // comment or /* comment */
D. // comment

4.Which of the following is called address operator ?
A. *
B. &
C. _
D. *

5.Which of the following is a correct identifier in C++ ?
A. 7var_name
B. 7VARNAME
C. VAR_1234
D. 7var_name

6.Which of the following is the correct syntax of including a user defined header files in C++ ?
A. #include
B. #include
C. #include “userdefined”
D. #include

7.Wrapping data and its related functionality into a single entity is known as ?
A. Abstraction
B. Encapsulation
C. Polymorphism
D. Abstraction

8.What does polymorphism in OOPs mean ?
A. Concept of allowing overiding of functions
B. Concept of hiding data
C. Concept of keeping things in differnt modules/files
D. Concept of allowing overiding of functions

9.Which concept allows you to reuse the written code ?
A. Encapsulation
B. Abstraction
C. Inheritance
D. Encapsulation

10.Which of the following shows multiple inheritances ?
A. A->B->C
B. A->B; A->C
C. A,B->C
D. A->B->C

11.How access specifiers in Class helps in Abstraction ?
A. They does not helps in any way
B. They allows us to show only required things to outer world
C. They help in keeping things together
D. They does not helps in any way

12.What is C++ ?
A. Procedural programming language
B. Object oriented programming language
C. Functional programming language
D. Procedural programming language

13.What does modularity mean ?
A. Hiding part of program
B. Subdividing program into small independent parts
C. Overriding parts of program
D. Hiding part of program

14.Which of the following feature of OOPs is not used in the following C++ code ?
A. Abstraction
B. Encapsulation
C. Inheritance
D. Abstraction

15.Which of the following class allows to declare only one object of it ?
A. Abstract class
B. Virtual class
C. Singleton class
D. Abstract class

16.Which of the following is not a type of Constructor ?
A. Friend constructor
B. Copy constructor
C. Default constructor
D. Friend constructor

17.Which of the following is correct ?
A. Base class pointer object cannot point to a derived class object
B. Derived class pointer object cannot point to a base class object
C. A derived class cannot have pointer objects
D. Base class pointer object cannot point to a derived class object

18.Out of the following, which is not a member of the class ?
A. Static function
B. Friend function
C. Constant function
D. Static function

19.What is the other name used for functions inside a class ?
A. Member variables
B. Member functions
C. Class functions
D. Member variables

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

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

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

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

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

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

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

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

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

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

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


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