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
Engineering :: All Aptitude Test ::
Home
»
Engineering
» Aptitude Test - 34
Hassan
1.
If a process is executing in its critical section, then no other processes can be executing in their critical section. This condition is called?
A.
Asynchronous exclusion
B.
Synchronous exclusion
C.
Critical exclusion
D.
Asynchronous exclusion
2.
Which one of the following is a synchronization tool?
A.
Socket
B.
Semaphore
C.
Pipe
D.
Socket
3.
A semaphore is a shared integer variable?
A.
That can not be more than one
B.
That can not drop below one
C.
That can not be more than zero
D.
That can not be more than one
4.
Mutual exclusion can be provided by the?
A.
Binary semaphores
B.
Mutex locks
C.
Both A & B
D.
Binary semaphores
5.
When high priority task is indirectly preempted by medium priority task effectively inverting the relative priority of the two tasks, the scenario is called?
A.
Priority modification
B.
Priority exchange
C.
Priority removal
D.
Priority modification
6.
Process synchronization can be done on?
A.
Software level
B.
Hardware level
C.
Both A & B
D.
Software level
7.
A monitor is a module that encapsulates?
A.
Procedures that operate on shared data structure
B.
Synchronization between concurrent procedure invocation
C.
Shared data structures
D.
Procedures that operate on shared data structure
8.
To enable a process to wait within the monitor?
A.
Semaphore must be used
B.
Condition variables must be used as boolean objects
C.
A condition variable must be declared as condition
D.
Semaphore must be used
9.
Is bool a fundamental data type in C++?
A.
No, it is expanded from macros
B.
No, it is an enum of {false, true}
C.
No, it is a typedef of unsigned char
D.
No, it is expanded from macros
10.
Find the odd one out?
A.
std::vector
B.
std::vector
C.
std::vector
D.
std::vector
11.
What is the value of the bool?
A.
1
B.
2
C.
False
D.
1
12.
What happens when a null pointer is converted into bool?
A.
The statement is ignored
B.
Bool value evaluates to false
C.
Bool value evaluates to true
D.
The statement is ignored
13.
For what values of the expression is an if-statement block not executed?
A.
0
B.
0 and -1
C.
0 and all negative values
D.
0
14.
Which of the two operators ++ and — work for the bool data type in C++?
A.
++ & —
B.
—
C.
++
D.
++ & —
15.
What will be the output of the following C++ code?
A.
75
B.
52
C.
62
D.
75
16.
What is the value of p in the following C++ code?
A.
2
B.
12
C.
16
D.
2
17.
Evaluate the following?
A.
0
B.
1
C.
2
D.
0
18.
How many characters are specified in the ASCII scheme?
A.
24
B.
256
C.
128
D.
24
19.
Given the variables p, q are of char type and r, s, t are of int type. Select the right statement?
A.
1 is true but 2 is false
B.
1 is false and 2 is true
C.
Both 1 and 2 are true
D.
1 is true but 2 is false
20.
Which of the following belongs to the set of character types?
A.
wchar_t
B.
char
C.
Both A & B
D.
wchar_t
21.
What will be the output of the following C++ code?
A.
I
B.
J
C.
N
D.
I
22.
How do we represent a wide character of the form wchar_t?
A.
la
B.
L[a]
C.
l’a’
D.
la
23.
What will be the output of the following C++ code?
A.
Empty
B.
10
C.
12
D.
Empty
24.
In C++, what is the sign of character data type by default?
A.
Implementation dependent
B.
Signed
C.
Unsigned
D.
Implementation dependent
25.
Is the size of character literals different in C and C++?
A.
Yes, they are different
B.
Implementation defined
C.
No, they are not different
D.
Yes, they are different
26.
Suppose in a hypothetical machine, the size of char is 32 bits. What would sizeof(char) return?
A.
1
B.
4
C.
Machine dependent
D.
1
27.
What constant defined in
header returns the number of bits in a char?
A.
CHAR_BIT
B.
BIT_CHAR
C.
SIZE_CHAR
D.
CHAR_BIT
28.
The direction of a line relative to a given meridian is called?
A.
Dip
B.
Angle
C.
Declination
D.
Dip
29.
How many types of a compass are used in surveying?
A.
2
B.
3
C.
4
D.
2
30.
Which bearing is measured in the direction of survey?
A.
Front
B.
Fore
C.
First
D.
Front
Related Subjects
Computer Science
Civil Engineering
Chemical Engineering
Agricultural Engineering
Mechanical Engineering
Electronics and Communication
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