Computer Science :: All Aptitude Test ::

1.What will be the output of the following PHP code ?
A. a
B. Error
C. $var
D. a

2.What will be the output of the following PHP code ?
A. 1
B. Error
C. 1234
D. 1

3.What will be the output of the following PHP code ?
A. Error
B. 35 students
C. 35
D. Error

4.A language which has the capability to generate new data types are called ?
A. Extensible
B. Overloaded
C. Encapsulated
D. Extensible

5.Which of the following is called extraction/get from operator ?
A. <<
B. >>
C. <
D. <<

6.Which of the following is called insertion/put to operator ?
A. <<
B. >>
C. >
D. <<

7.Who created C++ ?
A. Bjarne Stroustrup
B. Dennis Ritchie
C. Ken Thompson
D. Bjarne Stroustrup

8.Which of the following escape sequence represents tab ?
A. \t
B. \t\r
C. \b
D. \t

9.Which of the following escape sequence represents carriage return ?
A. \r
B. \n
C. \n\r
D. \r

10.Which function is used to write a single character to console in C++ ?
A. cout.put(ch)
B. cout.putline(ch)
C. write(ch)
D. cout.put(ch)

11.Which function is used to read a single character from the console in C++ ?
A. cin.get(ch)
B. getline(ch)
C. read(ch)
D. cin.get(ch)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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