Computer Science :: All Aptitude Test ::

1.Which process can be affected by other processes executing in the system?
A. Init process
B. Parent process
C. Child process
D. Init process

2.When several processes access the same data concurrently and the outcome of the execution depends on the particular order in which the access takes place, is called?
A. Critical condition
B. Essential condition
C. Race condition
D. Critical condition

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

4.Which one of the following is a synchronization tool?
A. Socket
B. Semaphore
C. Pipe
D. Socket

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

6.Mutual exclusion can be provided by the?
A. Binary semaphores
B. Mutex locks
C. Both A & B
D. Binary semaphores

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

8.Process synchronization can be done on?
A. Software level
B. Hardware level
C. Both A & B
D. Software level

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

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

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

12.Find the odd one out?
A. std::vector
B. std::vector
C. std::vector
D. std::vector

13.What is the value of the bool?
A. 1
B. 2
C. False
D. 1

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

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

16.Which of the two operators ++ and — work for the bool data type in C++?
A. ++ & —
B.
C. ++
D. ++ & —

17.What will be the output of the following C++ code?
A. 75
B. 52
C. 62
D. 75

18.What is the value of p in the following C++ code?
A. 2
B. 12
C. 16
D. 2

19.Evaluate the following?
A. 0
B. 1
C. 2
D. 0

20.How many characters are specified in the ASCII scheme?
A. 24
B. 256
C. 128
D. 24

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

22.Which of the following belongs to the set of character types?
A. wchar_t
B. char
C. Both A & B
D. wchar_t

23.What will be the output of the following C++ code?
A. I
B. J
C. N
D. I

24.How do we represent a wide character of the form wchar_t?
A. la
B. L[a]
C. l’a’
D. la

25.What will be the output of the following C++ code?
A. Empty
B. 10
C. 12
D. Empty

26.In C++, what is the sign of character data type by default?
A. Implementation dependent
B. Signed
C. Unsigned
D. Implementation dependent

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

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

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

30. WWW stands for ?
A. World Whole Web
B. Wide World Web
C. Web World Wide
D. World Whole Web


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