Join Us ::
Register
Login
Home
Classes
GK
Engineering
Past Papers
Current Affairs
Technical
GAT Subject
Programming
Medical Papers
728by90ad
GAT Subject
Computer Science
English Mcqs
Agriculture
Botany Mcqs
Arithmetic Aptitude
Engineering
Computer Science
Civil Engineering
Chemical Engineering
Agricultural Engineering
Mechanical Engineering
Electronics and Communication
Technical
Networking
Electronics
Database
Past Papers
Model Papers
FPSC Papers
PPSC Papers
NTS Papers
General Knowledge
Basic General Knowledge
General Science
Pakistan Politics
International Organizations
Current Affairs
Pakistan
National
International
CPEC
Engineering
Computer Science
Civil Engineering
Chemical Engineering
Agricultural Engineering
Programming
C Programming
C++ Programming
C# Programming
Java Programming
Computer Science :: All Aptitude Test ::
Home
»
GAT Subject
»
Computer Science
» Aptitude Test - 43
1.
The general principle underlying object-oriented error handling is that a called function should __?
A.
neither check for, nor handle errors
B.
check for errors but not be required to handle any detected
C.
handle errors, but not check for them
D.
neither check for, nor handle errors
2.
Reference variables and const class member
A.
must be assigned values in any derived class
B.
must never be initialized in a base class
C.
must be initialized, rather than assigned values
D.
must be assigned values in any derived class
3.
The actual arguments cannot he
A.
a constant or a variable
B.
of a different type from the corresponding formal arguments
C.
other functions
D.
a constant or a variable
4.
The function stricmp("Jose", "JOSE") will return _____
A.
-1
B.
0
C.
1
D.
-1
5.
Which is true?
A.
Coincidental cohesion is stronger than procedural cohesion
B.
Logical cohesion is stronger than coincidental cohesion
C.
Sequential cohesion is weaker than temporal cohesion
D.
Coincidental cohesion is stronger than procedural cohesion
6.
A predefined function that may be used to handle memory allocation errors is
A.
handle_error
B.
set_new_handler
C.
new_fix
D.
handle_error
7.
A function in a derived class that has the same name as a function in the parent class _____
A.
will cause an error message to display
B.
will override the base class function
C.
will be overridden by the base class function
D.
will cause an error message to display
8.
The _____ function returns the uppercase equivalent of a character
A.
caseupper
B.
charupper
C.
toupper
D.
caseupper
9.
When you instantiate a derived class object, a constructor for the derived class _____
A.
is not called
B.
is called prior to the base class constructor
C.
is called simultaneously with the base class constructor
D.
is not called
10.
A constructor may be _____
A.
provided automatically by C++
B.
written by you
C.
either (a) or (b).
D.
provided automatically by C++
11.
Software that can be used in applications other than the one for which it was originally written is called
A.
recyclable
B.
inherited
C.
reusable
D.
recyclable
12.
When the compiler cannot differentiate between two overloaded constructors, they are called______
A.
overloaded
B.
destructed
C.
ambiguous
D.
overloaded
13.
A function that is prototyped as double calculate(int num); may______
A.
receive an integer constant such as 5
B.
receive an integer variable
C.
either (a) or (b)
D.
receive an integer constant such as 5
14.
Passing a variable pointer as a constant _____
A.
protects the contents pointed to by the pointer from change
B.
eliminates the need to name the pointer in the function
C.
eliminates the need to give the pointer a type in the function
D.
protects the contents pointed to by the pointer from change
15.
Recursive Functions
A.
easier to code
B.
executable faster than iterative ones
C.
takes less main storage space
D.
easier to code
16.
The purpose of a conditional operator is to
A.
select one of the two values
B.
select the highest of the two values
C.
select one of the two values depending on a condition
D.
select one of the two values
17.
Which of the following, if any, are valid names for variables?
A.
amt.Sold
B.
amt-Sold
C.
amt_Sold
D.
amt.Sold
18.
A class hierarchy
A.
describes "is a kind of" relationships
B.
describes "has a" relationships
C.
shows the same relationships as an organization chart
D.
describes "is a kind of" relationships
19.
Which of the following C++ expressions is equivalent to the mathematical expression 53 ?
A.
5 ^ 3
B.
cube(5)
C.
pow (3, 5)
D.
5 ^ 3
20.
The right shift operator is represented by the symbol
A.
>�
B.
>>�
C.
->
D.
>�
21.
In C++, class definitions are most often
A.
stored with each program that uses them
B.
stored in a header file that is included in the programs that use them
C.
stored in a folder that you paste into every new project
D.
stored with each program that uses them
22.
To execute a C++ program, you first need to translate the source code into object code. This process is called
A.
coding
B.
compiling
C.
sourcing
D.
coding
23.
The rules of a programming language are called its _____
A.
code
B.
guidelines
C.
procedures
D.
code
24.
An array element is accessed using
A.
a first-in-first-out approach
B.
the dot operator
C.
a member name
D.
a first-in-first-out approach
25.
The program can access the private members of a class
A.
directly
B.
only through other private members of the class
C.
only through other public members of the class
D.
directly
26.
To hide a data member from the program, you must declare the data member in the _____ section of the class
A.
concealed
B.
confidential
C.
hidden
D.
concealed
27.
A function that is called automatically each time an object is created is a(n)
A.
constructor
B.
contractor
C.
builder
D.
constructor
28.
The function whose prototype is void getData(Item *thing); receives
A.
a pointer to a structure
B.
a reference to a structure
C.
a copy of a structure
D.
a pointer to a structure
29.
You may override the class access specifier for_____
A.
public members
B.
public and protected members
C.
any specific class members you choose
D.
public members
30.
The null character needs a space of
A.
zero bytes
B.
one byte
C.
three bytes
D.
zero bytes
Related Subjects
Programming Fundamentals
Object Oriented Programming
Discrete Structures
Data Structures and Algorithms
Digital Logic Design
Operating Systems
Database Systems
Artificial Intelligence
Computer Hardware
Management Information Systems
Disk Operating System (DOS)
System Analysis and Design
Unix Questions
Automation System
Linux Questions
Electronic Principles
Windows NT
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