Computer programming Mcq
Computer programming Mcq
me/placementclasses
Computer Science Core
A) process termination
B) serial termination
C) parallel termination
D) cascading termination
Answer:- D
Question 2:-
Number of tuples in a relation is called ________ and number of attributes is calle
d _______
A) domain, cardinality
B) degree, cardinality
C) cardinality, degree
Placement Classes
Telegram :- https://t.me/placementclasses
D) domain, degree
Answer:- C
Question 3:-
Places(location,name, type) Choose the correct option Which of the following que
ries can be used to retrieve name and type from table “Places(given in the passage
), where column ‘location” has value Delhi and output should be in thealphabetical
ly increasing order of column “name’?
Answer:- C
Question 4:-
What are necessary conditions for deadlock?
2. Hold and wait (where a process holds one resource and waits for other resourc
es)
4. Circular wait
A) Only 1 & 2
B) Only 1 & 3
C) Only 2 & 4
Answer:- E
Question 5:-
If a process is executing in its critical section, then no other processes can be exec
Placement Classes
Telegram :- https://t.me/placementclasses
A) mutual exclusion
B) critical exclusion
C) synchronous exclusion
D) asynchronous exclusion
Answer:- A
Question 6:-
For a deadlock to arise, which of the following conditions must hold simultaneousl
y ? ( choose all that apply )
A) Mutual exclusion
B) Starvation
D) No preemption
E) Circular wait
Answer:- A,C,D&E
Question 7:-
Consider the following set of processes, the length of the CPU burst time given in
milliseconds : Process Burst time P1 6 P2 8 P3 7 P4 3 Assuming the above process
being scheduled with the SJF scheduling algorithm :
Answer:- C
Question 8:-
Orders are processed in the sequence they arrive if _______ rule sequences the jo
bs.
Placement Classes
Telegram :- https://t.me/placementclasses
D) critical ratio
Answer:- C
Question 9:-
A solution to the problem of indefinite blockage of low – priority processes is :
A) Starvation
B) Wait queue
C) Ready queue
D) Aging
Answer:- D
Question 10:-
One of the disadvantages of the priority scheduling algorithm is that :
C) it can lead to some low priority process waiting indefinitely for the CPU
D) None of these
Answer:- C
D) Both 1 and 3
Placement Classes
Telegram :- https://t.me/placementclasses
Answer:- E
Question 2:-
Which of the following statements are true?
3 If the word is not found in the Cache and is in main memory, it is a miss
A) Both 1 and 3
B) Both 2 and 3
C) Both 1 and 4
D) 1,2 and 3
E) All-1,2, 3 and 4
Answer:- E
Question 3:-
Group A Group B
A) A-3,B-4,C-1,D-2
C) A-2,B-1,C-4,D-3
D) A-4,B-2,C-3,D-1
Answer:- B
Placement Classes
Telegram :- https://t.me/placementclasses
Question 4:-
GroupA Group B
C) A-1,B-3,C-2
Answer:- A
Question 5:-
Group A Group B
B. Pages 2. Compaction
C) A-2;B-1.;C-4; D-3
Answer:- B
Question 6:-
Calculate the number of frames the memory will have if the page size is 4 bytes an
d the physical memory of 16 bytes.
Placement Classes
Telegram :- https://t.me/placementclasses
D) 1 frame 16 bytes
Answer:- A
P1 0 3 10
P2 0 1 1
P3 2 5 2
P4 2 4 1
P5 3 2 5
Process> Pro
Arrival Time>A
Priority >Pri
A) P2-P1-P1-P5-P1-P1-P4-P3
B) P2-P1-P5-P1-P1-P4-P3
C) P2-P1-P1-P5-P4-P1-P3
D) P2-P1-P1-P5-P1-P4-P3
Answer:- D
Question 2:-
In ------------------, if a parent process terminates, then all of its children processes
7
Placement Classes
Telegram :- https://t.me/placementclasses
A) process termination
B) serial termination
C) parallel termination
D) cascading termination
Answer:- D
Question 3:-
Which of the following is/are true?
2 Resourse
allocation graph is used for a system with multiple instances of each resource type.
A) Only 1
B) Only 2
C) Both 1 and 2
D) Neither 1 or 2
Answer:- A
Question 4:-
Which of the following statements is/are incorrect’
A) Only 1
B) Only 2
C) Only 3
D) Both 1 and 2
Answer:- D
Question 5:-
A semaphore S is an integer variable that, apart from initialization, is accessed onl
Placement Classes
Telegram :- https://t.me/placementclasses
Answer:- B
Question 6:-
Bankers Algorithm is a technique of _________.
A) deadlock avoidance
B) deadlock prevention
C) deadlock detection
D) deadlock creation
Answer:- A
Question 7:-
Round robin scheduling falls under the category of :
A) Non Preemptive
B) Preemptive
C) Mutli Preemptive
D) None of these
Answer:- B
Question 8:-
The most optimal scheduling algorithm is :
C) RR – Round Robin
D) None of these
Answer:- B
Placement Classes
Telegram :- https://t.me/placementclasses
Question 9:-
Consider the following page reference string : 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6 i
) For LRU page replacement algorithm with 4 frames, the number of page faults is :
A) 14
B) 8
C) 11
D) 10
Answer:- D
Question 10:-
For FIFO page replacement algorithms with 4 frames, the number of page faults is :
A) 16
B) 14
C) 11
D) 15
Answer:- B
A.windows95 1.FAT16
B.DOS 2.Redundancy
C.RAID 3. NTFS
10
Placement Classes
Telegram :- https://t.me/placementclasses
Answer:- B
Question 2:-
Consider the following reference string - 4.,7,0, 7, 1, 0, 1,2, 1, 2, 7, 1,2, 0 Calculate
the difference between the number of page faults encountered when the optimal
page replacement policy is used with 4 page frames and 3 page frames respectively
A) 0
B) 1
C) 2
D) 3
Answer:- B
Question 3:-
Group A Group B
Answer:- B
Question 4:-
Memory management technique in which system stores and retrieves data from s
econdary storage for use in main memory is called
A) fragmentation
B) paging
C) mapping
11
Placement Classes
Telegram :- https://t.me/placementclasses
Answer:- B
Question 5:-
I/O hardware contains
A) bus
B) controller
Answer:- D
Question 6:-
Run time mapping from virtual to physical address is done by
B) CPU
C) PCI
Answer:- A
Question 7:-
The page table contains
A) page offset
C) page size
Answer:- B
Question 8:-
Thrashing _______ the CPU utilization.
A) increases
B) keeps constant
12
Placement Classes
Telegram :- https://t.me/placementclasses
C) decreases
D) none of these
Answer:- C
Question 9:-
A process is thrashing if :
D) None of these
Answer:- C
Question 10:-
The hardware mechanism that allows a device to notify the CPU is called _______.
A) polling
B) interrupt
C) driver
D) Controlling
Answer:- B
Answer:- B
Question 2:-
13
Placement Classes
Telegram :- https://t.me/placementclasses
SELECT Name, Age FROM tbl_student WHERE Age NOT BETWEEN 12 AND 15;
Answer:- C
Question 3:-
A parent Process executes ______ system call to create a child process.
A) exce()
B) fork()
C) child()
D) create()
Answer:- B
Question 4:-
Which of the following is example of Object based logical model ?
B) Hierarchical Model
C) Relational Model
D) Network Model
Answer:- A
Question 5:-
An entity in A is associated with at most one entity in B, and an entity in B is associated w
ithat most one entity in A. This is called as
A) One-to-many
B) One-to-one
C) Many-to-many
14
Placement Classes
Telegram :- https://t.me/placementclasses
D) Many-to-one
Answer:- B
Question 6:-
The attribute name could be structured as a attribute consisting of first name, mid
dle initial, and last name . This type of attribute is called
A) Simple attribute
B) Composite attribute
C) Multivalued attribute
D) Derived attribute
Answer:- B
Question 7:-
In the Relational Model, the number of columns in a table is termed as _______.
A) cardinality
B) degree
C) domain
D) None of these
Answer:- B
Question 8:-
Which company has developed the hierarchical model?
A) IBM
B) Sun Microsystems
C) Oracle
D) Microsoft
Answer:- A
Question 9:-
Which is the subset of SQL commands used to manipulate Oracle Database
structures, including tables?
15
Placement Classes
Telegram :- https://t.me/placementclasses
C) Both of above
D) None
Answer:- A
Question 10:-
What is a view?
D) None of these
Answer:- B
A) candidate key
B) primary key
C) foreign key
D) secondary key
Answer:- A
Question 2:-
car(car_number,car_type,mfd) owner(name,age,car_number,number) Akshay has
2 tables namely - car and owner (given in the passage), with a common column car
_number. Which of the following queries will retrieve car_ type where owner na-
me Is ‘Nikhil’?
A)
SELECT car_type FROM car WHERE car_number IN (SELECT car_number FROM own
er WHERE name=’Nikhil’);
16
Placement Classes
Telegram :- https://t.me/placementclasses
B)
SELECT car_type FROM car WHERE car_number=(SELECT * FROM owner WHERE na
me= ‘NikhiI’);
C)
SELECT car _type FROM car WHERE car _number LIKE (SELECT * FROM owner WHER
E name=’NikhiI’);
D)
SELECT car_type FROM car WHERE car_number BETWEEN(SELECT car_number FRO
M owner WHERE name=’Nikhil’);
Answer:- A
Question 3:-
Which of the following is a fundamental operation in relational algebra ?
A) Set intersection
B) Natural join
C) Assignment
Answer:- D
Question 4:-
Which of the following is not a unary operator?
A) where
B) select
C) rename
D) min
Answer:- D
Question 5:-
If in JOIN operation, conditions of JOIN operation are not satisfied then results of
operation is
17
Placement Classes
Telegram :- https://t.me/placementclasses
Answer:- A
Question 6:-
Which of the following is not a DML statement?
A) Select
B) Insert
C) Create
D) Delete
Answer:- C
Question 7:-
Which of the following can be rolledback?
A) Truncate
B) Delete
C) Drop
D) None
Answer:- B
Question 8:-
A ________ in a table represents a relationship among a set of values.
A) Column
B) Key
C) Row
D) Entry
Answer:- C
Question 9:-
A relational database consists of a collection of
A) Tables
18
Placement Classes
Telegram :- https://t.me/placementclasses
B) Fields
C) Records
D) Keys
Answer:- A
Question 10:-
The term _______ is used to refer to a row.
A) Attribute
B) Tuple
C) Field
D) Instance
Answer:- B
A) Isolation
B) Atomicity
Answer:- C
Question 2:-
Amit hs some knowledge about database normalisation.He has created a table "c
ustomer", which has the following characteristics.
19
Placement Classes
Telegram :- https://t.me/placementclasses
3)There is no column with redundant data in the table In which normal form is the
table?
A) 1NF
B) 2NF
C) 3NF
D) BCNF
Answer:- B
Question 3:-
What does isolation in Acid rules for the transaction in database mean?
A) Either the effects of whole transaction is reflected on database or database is rolled back
to its original state
D) Every individual transaction must leave database in a cosistent state. maintaining the
integrity of the database.
Answer:- B
Question 4:-
Amit hs some knowledge about database normalisation.He has created a table "c
ustomer", which has the following characteristics.
3)There is no column with redundant data in the table In which normal form
is the table?
A) 1NF
B) 2NF
C) 3NF
20
Placement Classes
Telegram :- https://t.me/placementclasses
D) BCNF
Answer:- B
Question 5:-
What does isolation in Acid rules for transaction in database mean?
A) Either the effects of whole transaction is reflected on database or database is rolled back
to its original state
D) Every individual transaction must leave database in a cosistent state. maintaining the
integrity of the database
Answer:- B
Question 6:-
What does isolation in Acid rules for transaction in database mean?
A) Either the effects of whole transaction is reflected on database or database is rolled back
to its original state
D) Every individual transaction must leave database in a cosistent state .maintaining the
integrity of the database
Answer:- B
Question 7:-
Tables in second normal form (2NF):
D) Have all non key fields depend on the whole primary key
Answer:- A
Question 8:-
A BCNF is:
21
Placement Classes
Telegram :- https://t.me/placementclasses
D) None of these
Answer:- B
Question 9:-
Which forms are based on the concept of functional dependency:
a)1NF
b) 2NF
c) 3NF
d) 4NF
A) 1NF
B) 2NF
C) 3NF
D) 4NF
Answer:- C
Question 10:-
Which of the following one is not true
D) All of these
Answer:- D
22
Placement Classes
Telegram :- https://t.me/placementclasses
Group A Group B
C A-3,B-1,C-4,D-2
Answer:- D
Question 2:-
Which of the following condition is used to transmit two packets over a medium at
the same time?
A) Collision
B) Contention
C) Asynchronous
D) Synchronous
Answer:- A
Question 3:-
Which of the following method can't be used for data communication?
A) Simplex
B) Multiplex
C) Half Duplex
D) Full Duplex
Answer:- B
Question 4:-
23
Placement Classes
Telegram :- https://t.me/placementclasses
Which of the following is used for error detection in high level TCP/IP protocols?
A) Data Sum
B) Bit Sum
C) Check Sum
D) Error Sum
Answer:- C
Question 5:-
What is the default subnet mask for a class C network?
A) 127.0.0.1
B) 255.0.0.0
C) 255.255.0.0
D) 255.255.255.0
Answer:- D
Question 6:-
What is the maximum size of header of an IP?
A) 32
B) 54
C) 28
D) 60
Answer:- D
Question 7:-
A distributed network configuration in which all data/information pass through a
central computer is?
A) Bus network
B) Star network
C) Ring network
D) Point-to-point network
24
Placement Classes
Telegram :- https://t.me/placementclasses
Answer:- B
Question 8:-
Which of the following is not the Networking Devices?
A) Gateways
B) Linux
C) Routers
D) Firewalls
Answer:- B
D) Gateway operate at network and transport layer of the OSI model E Both B and C
Answer:- E
Question 2:-
Cooperating processes require an Interprocess Communication (IPC) mechanism t
hat will allow them to exchange data and information. Which of the following opti
ons is/are the method(s) of Interprocess Communication(IPC)?
A) Message passing
B) Cooperation
C) Shared memory
25
Placement Classes
Telegram :- https://t.me/placementclasses
Answer:- E
Question 3:-
Gateway works in which layer?
A) Physical layer
C) Network layer
D) None
Answer:- C
Question 4:-
Bridge works in which layer?
A) Physical Layer
C) Network Layer
D) None
Answer:- B
Question 5:-
MAC Address is the example of?
A) Transport Layer
C) Application Layer
D) Physical Layer
Answer:- B
Question 6:-
What is the address size of IPv6 ?
A) 32 bit
B) 64 bit
C) 128 bit
26
Placement Classes
Telegram :- https://t.me/placementclasses
D) 256 bit
Answer:- C
Question 7:-
Repeater operates in which layer of the OSI model?
A) Physical layer
C) Network layer
D) Transport layer
Answer:- A
Question 8:-
Which layers of the OSI model are host-to-host layers? A. B. C. D.
Answer:- A
Question 9:-
How many layers are in the TCP/IP model?
A) 4 layers
B) 5 layers
C) 6 layers
D) 7 layers
Answer:- A
Question 10:-
Which of the following IP address class is Multicast A. B.Class B C.Class C D.Class D
A) Class A
B) Class B
27
Placement Classes
Telegram :- https://t.me/placementclasses
C) Class C
D) Class D
Answer:- D
C) Go-Backn ARQ
D) Piggybacking
Answer:- D
Question 2:-
Which of the following statements is true about bus topology?
Answer:- A & B
28
Placement Classes