Académique Documents
Professionnel Documents
Culture Documents
b) entire process
d) first page of a process
b) secondary memory
d) none of the mentioned
5. When a program tries to access a page that is mapped in address space but not loaded in
physical memory, then
a) segmentation fault occurs
b) fatal error occurs
c) page fault occurs
d) no error occurs
Ans:C
6. Effective access time is directly proportional to
a) page-fault rate
b) hit ratio
c) memory access time
d) none of the mentioned
Ans:A
7. In FIFO page replacement algorithm, when a page must be replaced
a) oldest page is chosen
b) newest page is chosen
c) random page is chosen
d) none of the mentioned
Ans:A
8. Which algorithm chooses the page that has not been used for the longest period of time
whenever the page required to be replaced?
a) first in first out algorithm
b) additional reference bit algorithm
c) least recently used algorithm
d) counting based page replacement algorithm
Ans:C
Department of CSE/IT
9. A process is thrashing if
a) it is spending more time paging than executing b) it is spending less time paging than executing
c) page fault occurs
d) swapping can not take place
Ans:A
10. Working set model for page replacement is based on the assumption of
a) modularity
b) locality
c) globalization
d) random access
Ans:B
11) Which of the following page replacement algorithms suffers from Beladys Anomaly ?
a) Optimal replacement
b) LRU
c) FIFO
d) Both optimal replacement and FIFO
Ans:C
12) A process refers to 5 pages, A, B, C, D, E in the order : A, B, C, D, A, B, E, A, B, C, D, E. If
the page replacement algorithm is FIFO, the number of page transfers with an empty internal
store of 3 frames is :
a) 8
b) 10
c) 9
d) 7
Ans: C
13) In question 2, if the number of page frames is increased to 4, then the number of page
transfers :
a) decreases
b) increases
c) remains the same
d) None of these
Ans: B
14) A memory page containing a heavily used variable that was initialized very early and is in
constant use is removed, then the page replacement algorithm used is :
a) LRU
b) LFU
c) FIFO
d) None of these
Ans: C
15) A virtual memory system uses First In First Out (FIFO) page replacement policy and
allocates a fixed number of frames to a process. Consider the following statements
P : Increasing the number of page frames allocated to a process sometimes increases the page fault
rateQ : Some programs do not exhibit locality of reference
Which of the following is TRUE?
a) Both P and Q are true, and Q is the reason for P
b) Both P and Q are true, but Q is not the reason for P
c) P is false but Q is true
d) Both P and Q are false
Ans: C
Department of CSE/IT
16) Users _______ that their processes are running on a paged system.
a) are aware
b) are unaware
c) None of these
Ans: B
17) If no frames are free, _____ page transfer(s) is/are required.
a) one
b) two
c) three
d) four
Ans: B
18) When a page is selected for replacement, and its modify bit is set :
a) the page is clean
b) the page has been modified since it was read in from the disk
c) the page is dirty
d) a and b
Ans: B and C
19) The aim of creating page replacement algorithms is to :
a) replace pages faster
b) increase the page fault rate
c) decrease the page fault rate
d) to allocate multiple pages to processes
Ans: C
20) A FIFO replacement algorithm associates with each page the _______
a) time it was brought into memory
b) size of the page in memory
c) page after and before it
d) All of these
Ans: A
21) Optimal page replacement algorithm is :
a) Replace the page that has not been used for a long time
b) Replace the page that has been used for a long time
c) Replace the page that will not be used for a long time
d) None of these
Ans: C
22) Optimal page replacement algorithm is difficult to implement, because :
a) it requires a lot of information b) it requires future knowledge of the reference string
c) it is too complex
d) it is extremely expensive
Ans: B
23) LRU page replacement algorithm associates with each page the ______
a) time it was brought into memory
b) the time of that pages last use
c) page after and before it
d) All of these
Ans: B
Ans: D
ii) How many page faults does the FIFO page replacement algorithm produce ?
a) 10
b) 15
c) 11
d) 12
Ans: B
25) The two methods how LRU page replacement policy can be implemented in hardware
are : (choose two)
a) Counters
b) RAM
c) Stack
d) Registers
Ans: A and C
26) Round robin scheduling falls under the category of :
a) Non preemptive scheduling
b) Preemptive scheduling
c) None of these
Ans: B
27) With round robin scheduling algorithm in a time shared system,
a) using very large time slices converts it into First come First served scheduling algorithm
b) using very small time slices converts it into First come First served scheduling algorithm
c) using extremely small time slices increases performance
d) using very small time slices converts it into Shortest Job First algorithm
Ans: A
28) The portion of the process scheduler in an operating system that dispatches processes is
concerned with :
a) assigning ready processes to CPU
b) assigning ready processes to waiting queue
c) assigning running processes to blocked queue
d) All of these
Ans: A
29) Complex scheduling algorithms :
a) are very appropriate for very large computers
c) use many resources
Ans: A
32) Scheduling is :
a) allowing a job to use the processor
c) Both a and b
Ans: C
33) There are 10 different processes running on a workstation. Idle processes are waiting for
an input event in the input queue. Busy processes are scheduled with the Round-Robin
timesharing method. Which out of the following quantum times is the best value for small
response times, if the processes have a short runtime, e.g. less than 10ms ?
a) tQ = 15ms
b) tQ = 40ms
c) tQ = 45ms
d) tQ = 50ms
Ans: A
34) Orders are processed in the sequence they arrive if _______ rule sequences the jobs.
a) earliest due date
b) slack time remaining
c) first come, first served
d) critical ratio
Ans: C
35) Which of the following algorithms tends to minimize the process flow time ?
a) First come First served
b) Shortest Job First
c) Earliest Deadline First
d) Longest Job First
Ans: B
36) Under multiprogramming, turnaround time for short jobs is usually ________ and that
for long jobs is slightly ___________.
a) Lengthened; Shortened
b) Shortened; Lengthened
c) Shortened; Shortened
d) Shortened; Unchanged
Ans: B
37) Which of the following statements are true ?
I. Shortest remaining time first scheduling may cause starvation
II. Preemptive scheduling may cause starvation
III. Round robin is better than FCFS in terms of response time
a) I only
b) I and III only
c) II and III only
d) I, II and III
Ans: D
Ans: C
40) Semaphore is a/an _______ to solve the critical section problem.
a) hardware for a system
b) special program for a system
c) integer variable
d) None of these
Ans: C
41) The two atomic operations permissible on semaphores are : (choose two)
a) wait
b) stop
c) hold
d) signal
Ans: A and D
42) Spinlocks are :
a) CPU cycles wasting locks over critical sections of programs
b) locks that avoid time wastage in context switches
c) locks that work better on multiprocessor systems
d) All of these
Ans: D
43) The main disadvantage of spinlocks is that :
a) they are not sufficient for many process
b) they require busy waiting
c) they are unreliable sometimes
d) they are too complex for programmers
Ans: B
44) The wait operation of the semaphore basically works on the basic _______ system call.
a) stop()
b) block()
c) hold()
d) wait()
Ans: B
45) The signal operation of the semaphore basically works on the basic _______ system call.
a) continue()
b) wakeup()
c) getup()
d) start()
Ans: B
Department of CSE/IT
c) 3
Ans: C
d) None of these
50) Two processes, P1 and P2, need to access a critical section of code. Consider the following
synchronization construct used by the processes :
Process P1 :
while(true)
{
w1 = true;
while(w2 == true);
Critical section
w1 = false;
}
Remainder Section
Process P2 :
while(true)
{
w2 = true;
while(w1 == true);
Critical section
w2 = false;
}
Remainder Section Here, w1 and w2 are shared variables, which are initialized to false. Which one
of the following statements is TRUE about the above construct?
a) It does not ensure mutual exclusion
b) It does not ensure bounded waiting
c) It requires that processes enter the critical section in strict alternation
d) It does not prevent deadlocks, but ensures mutual exclusion
Ans: D
51) Each request requires that the system consider the __________, _____________,
____________ to decide whether the current request can be satisfied or must wait to avoid a
future possible deadlock. (choose three)
a) resources currently available
b) processes that have previously been in the system
c) resources currently allocated to each process
d) future requests and releases of each process
Ans: A, C and D
52) Given a priori information about the ________ number of resources of each type that
maybe requested for each process, it is possible to construct an algorithm that ensures that the
system will never enter a deadlock state.
a) minimum
b) average
c) maximum
d) approximate
Ans: C
Department of CSE/IT
53) A deadlock avoidance algorithm dynamically examines the __________, to ensure that a
circular wait condition can never exist.
a) resource allocation state
b) system storage state
c) operating system
d) resources
Ans: A
54) A state is safe, if :
a) the system does not crash due to deadlock occurrence
b) the system can allocate resources to each process in some order and still avoid a deadlock
c) the state keeps the system protected and safe
d) All of these
Ans: B
55) A system is in a safe state only if there exists a :
a) safe allocation
b) safe resource
c) safe sequence
d) All of these
Ans: C
c) either a or b
Ans: B
d) None of these
59) The resource allocation graph is not applicable to a resource allocation system :
a) with multiple instances of each resource type b) with a single instance of each resource type
c) Both a and b
Ans: A
60) The Bankers algorithm is _____________ than the resource allocation graph algorithm.
a) less efficient
b) more efficient
c) None of these
Ans: A
SUBJECT:C++
1) 3.4E - 38 is equivalent to ?
A.3.4 x 10 x 38
B.3.4 x 38
C.3.4 x 10-38
D. None of these
Ans : C
2) Which statement is most appropriate for C++ language ?
A.Type Less language
B.Statically types Language
C.Dynamically typed language
D.Both B and C
Ans: B
Department of CSE/IT
10
Ans: A
5) Keyword used for Dynamic method resolution ?
A.abstract
C.virtual
B.dynamic
D.typeid
Ans: C
6) Which of the following is not a feature of C++ ?
A.Operator overloading
C.Inheritance
B.Namespaces
D.Reflection
Ans: D
7) What is the right way to declare a copy constructor of a class if the name of class is X ?
A.X(const X* arg)
B.X( const X& arg)
C.X(X arg)
D.X(X* arg)
Ans: B
8) What is the implicit pointer that is passed as the first argument for nonstatic member
functions ?
A.self pointer
B.std::auto_ptr pointer
C.myself pointer
D.this pointer
Ans: D
9) Which classes allow primitive types to be accessed as objects?
A.Storage
B.Virtual
C.Friend
D.Wrapper
Ans: D
10)Which looping process checks the test condition at the end of the loop?
A. for
B. while
D.no looping process checks the test condition at the end
Ans:C
11)Statement scanf(%d,80);
A. Assign an integer to variable i
C.Print the value of I
Ans: A
C.do-while
11
12)Which looping process is best used when the number of iterations is known?
A.for
B. while
C.do-while
D.all looping processes require that the iterations be known
Ans: A
13)*ptr++ is equivalent to:
A. ptr++
Ans: D
B.*ptr
C.++*ptr
B. is-a relationship
D. none of the above
SUBJECT:JAVA
1) Which is a valid keyword in java?
A. interface B. string
C. Float
D. unsigned
Ans: A
2)What is the numerical range of a char?
A. -128 to 127
B. -(215) to (215) 1
C. 0 to 32767
D. 0 to 65535
Ans: D
3) Which is a reserved word in the Java programming language?
A. method
B. native
C. subclasses
D. reference
Department of CSE/IT
12
Ans: B
4) Which one of the following will declare an array and initialize it with five numbers?
A. Array a = new Array(5);
C. int a [] = new int[5];
B. int [] a={23,22,21,20,19};
D int [5] array;
Ans: B
5) Which is the valid declarations within an interface definition?
A. public double methoda();
C. static void methoda(double d1);
Ans: A
6) Which is a valid declarations of a String?
A. String s1 = null;
C. String s3 = (String) 'abc';
B. String s2 = 'null';
D. String s4 = (String) '\ufeed';
Ans: A
7) What is the name of the method used to start a thread execution?
A. init();
B. start();
C. run();
D. resume();
Ans: B
8) Which of the following will directly stop the execution of a Thread?
A. wait()
code
B. notify()
C. notifyall()
D. exits synchronized
Ans: A
B. start();
C. stop();
D. main();
Ans: A
Department of CSE/IT
13
B. construct(); C. start();
D. register();
Ans: D
12) Which of the following will not directly cause a thread to stop?
A. notify()
B. wait()
Ans: A
13) What allows the programmer to destroy an object x?
A. x.delete()
C. Runtime.getRuntime().gc()
object
B. x.finalize()
D. Only the garbage collection system can destroy an
Ans: D
14) Which class or interface defines the wait(),notify(),notifyAll() methods?
A. Object
B. Thread
C. Runnable
D. Class
Ans: A
SUBJECT:OOAD
1. Which diagram is NOT commonly used for illustrating use cases?
(a) system sequence diagram
(b) activity diagram
(c) use case diagram
(d) Collaboration diagram
Ans:d
2. What can UML interfaces be used for?
(a) to provide concrete classes with the stereotype <<interface>>
Department of CSE/IT
14
Use Case
Activity
Interaction diagrams
Component
Ans:c
3
5
4
6
Ans:c
Structural
Behavioral
Grouping
Annotational
Ans:b
Inheritance
Collaboration
Use Case
Interface
Ans:d
Class
Object
Collaboration
Composition
Ans:c
Department of CSE/IT
15
Is a kind
Has a kind
Have a
None
Ans:a
9) Dependency stereotype
a.
b.
c.
d.
Visibility
Navigation
Friend
Composition
Ans:c
Realization
Association
Generalization
Dependency
Ans:A
SUBJECT:ACD
1) Which of the following string has length 0?
A. a
B.
C.abc
D.s
Ans: B
2) A grammar is a _____________ device
A. generative
B. cognitive
C. acceptor
D. cant say
Ans: A
3) Let NFA has a finite number n of states ,the DFA will have at most ________states.
A. 2n
B. n/2
C. n*n
D. 2*n
Ans: A
4) Which of the following is not a prefix of abc ?
Department of CSE/IT
16
A.
B. a
C. ab
D. bc
Ans: D
5) Let maximum number of states in a DFA =128 .Then its equivalent NFA
has_______________ states.
A.3
B.5
C.7
D.9
Ans:C
6) Let r and s are regular expressions denoting the languages R and S.Then ( r + s) denotes
A.R U S
B.R S
C.both A & B
D.None
Ans: A
7) A variable that derives is called ___________ variable
A.Mutable
B.Callable
C.Nullable
D.Both A & C
Ans: C
8) Context sensitive grammar are described by type ____________ grammar
A. 3
B. 8
C.6
D. 1
Ans:d
9) A PDA behaves like as FA when the number of auxiliary memory it has is
A. 0
B. 1
C. 2
D. None
Ans: A
10) If PCP is decidable then MPCP is
A. Decidable
B. Un decidable
C. Cannot say
D. None
Ans: A
11) The intersection of a CFL and a regular language is__________
A.PDA
B.CFL
C.Both A & B
D.None
Ans: B
12) Let r and s are regular expressions denoting the languages R and S.Then ( rs) denotes
A.PDA
B.RS
C.Both A & B
D.None
Ans: B
13) ______________ grammar is also known as Type 3 grammar.
Department of CSE/IT
17
A.Active
B.Passive
C.Regular
D.None
Ans: C
C.Both A & B
D.None
Ans: B
15) If A={ 0 ,1 } then the number of possible strings of length n is ________
B. n2
A. n
C. nn
D. 2n
Ans: D.
3) In OSI network architecture, the dialogue control and token management are
responsibilities of ?
a.
b.
session layer
network layer
Department of CSE/IT
18
c. transport layer
d. data link layer
Ans:a
4) What is the main function of transport layer ?
a. node to node delivery
b. process to process message delivery
c. synchronization
d. updating and maintenance of routing tables
Ans:b
5) To deliver a message to the correct application program running on a host, the .... address
must be consulted ?
a. port
b. physical
c. IP
d. None
Ans:c
6) How many hosts are attached to each of the local area networks at your site?
a. 128
b. 254
c. 256
d. 64
Ans:b
7) The physical layer is concerned with the movement of _______ over the physical medium.
a.
b.
c.
d.
programs
dialogs
protocols
bits
Ans:d
8) A packet whose destination is outside the local TCP/IP network segment is sent to the
Department of CSE/IT
19
a.
b.
c.
d.
File server
Default gateway
DNS server
DHCP server
Ans:b
8
16
32
64
Ans:c
DNS
TFTP
RIP
All of the above
Ans:d
11) Which of the IP headers decides when the packet should be discarded?
a.
b.
c.
d.
Fragment control
TTL
Checksum
Header length
Ans:b
modem
protocols
gateway
multiplexer
ans:a
Department of CSE/IT
20
UDP
Ethernet
IPX
All
Ans:b
21
23
25
53
Ans:c
32
64
128
Variable
Ans:c
Mesh
Bus
Ring
Star
Ans:
17) The process-to-process delivery of the entire message is the responsibility of the _______
layer.
A) Network
B) Transport
C) Application
D)
Physical
Department of CSE/IT
21
Ans:b
18) The _______ layer is the layer closest to the transmission medium.
a. Physical
b. Data link
c. Transport
d. Network
Ans:a
19) As the data packet moves from the upper to the lower layers, headers are _______.
a.
b.
c.
d.
Added
Removed
Rearranged
Rearranged
Ans:a
20) The _______ layer lies between the network layer and the application layer.
a. Network
b. Data link
c. Transport
d. None
Ans:c
21) The _______ layer changes bits into electromagnetic signals.
a) Physical
b) Data link
c) Transport
d) None
Ans:a
22) Which of the following is an application layer service?
a. Remote log-in
b. File transfer and access
c. Mail service
Department of CSE/IT
22
SUBJECT: DBMS
1.
A.
Department of CSE/IT
23
2.
SAVE AS
SAVE
UPDATE
MODIFY
Ans:c
INSERT NEW
INSERT INTO
ADD NEW
ADD RECORD
Ans:b
5. With SQL, how do you select a column named "FirstName" from a table named
"Persons"?
Department of CSE/IT
24
6. With SQL, how do you select all the records from a table named "Persons" where the
value of the column "FirstName" is "Peter"?
A.
B.
C.
D.
7.
With SQL, how do you select all the records from a table named "Persons" where the
value of the column "FirstName" starts with an "a"?
A.
B.
C.
D.
8.
Department of CSE/IT
25
ORDER BY
SORT
ORDER
SORT BY
Ans:a
10. With SQL, how can you return all the records from a table named "Persons" sorted
descending by "FirstName"?
A.
B.
C.
D.
11. With SQL, how can you insert a new record into the "Persons" table?
A. INSERT ('Jimmy', 'Jackson') INTO Persons
B. INSERT VALUES ('Jimmy', 'Jackson') INTO Persons
C. INSERT INTO Persons VALUES ('Jimmy', 'Jackson')
Ans:c
12. With SQL, how can you insert "Olsen" as the "LastName" in the "Persons" table?
A. INSERT INTO Persons (LastName) VALUES ('Olsen')
B. INSERT INTO Persons ('Olsen') INTO LastName
C. INSERT ('Olsen') INTO Persons (LastName)
Ans:a
13. How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons
table?
A.
B.
C.
D.
Department of CSE/IT
26
14. With SQL, how can you delete the records where the "FirstName" is "Peter" in the
Persons Table?
A. DELETE ROW FirstName='Peter' FROM Persons
B. DELETE FirstName='Peter' FROM Persons
C. DELETE FROM Persons WHERE FirstName = 'Peter'
Ans:c
15. With SQL, how can you return the number of records in the "Persons" table?
A.
B.
C.
D.
Ans:
27
C. Weak Entities
D. Primary Key
Ans:b
19. In the E-R diagrams, the term cardinality is a synonym for the term ?
A. Attribute
B. Degree
C. Entities
D. Cartesian
Ans:d
20. TRUNCATE statement in SQL is a ?
A. DML statement
B. DDL statement
C. DCL statement
D. None of above
Ans:b
21. The default date format in SQL is ?
A. DD-MON-YY
B. DD-MM-YY
C. DD-MM-YYY
D. MM-DD-YY
Ans:a
28
26. In a Third Normal Form relation, every attribute is non transitively and fully
dependent on the every candidate key ?
A. Prime
B. Non Prime
C. Unique
Department of CSE/IT
29
D. None of these
Ans:c
27. A generalization of the Boyce Codd Normal form to relation schemes which includes the
multi valued dependencies is called?
A. Second Normal Form
B. Third Normal Form
C. Fourth Normal Form
D. Fifth Normal Form
Ans:d
28. In relational schema, each tuple is divided into fields called ?
A. Relations
B. Domains
C. Queries
D. All of above
Ans:b
29. A logical schema?
A. is the entire database
B. is a standard way of organizing information into accessible parts
C. describes how data is actually stored on disk
D. All of above
Ans:b
30. Periodically adding, changing and deleting file records is called file?
A. updating
B. upgrading
C. restructuring
D. renewing
Department of CSE/IT
30
ans:a
SUBJECT:SOFTWARE ENGINERING
1.The user interface analysis and design process is an iterative process and it can be
Represented as a ________________. [ A]
A. Spiral model
B. Increment model
C. Waterfall model
D. None
2. ______________Failure Costs are incurred when we detect a defect in our product. [A ]
A. Internal
B. External
C. Both A&B
D. None
Department of CSE/IT
31
b) Documents
d) All
13. When compared with traditional engineering disciplines the software engineering is [A ]
a) Young
b) Old
c) Contemporary
d) None
14. Below software engineering phase requires less skilled manpower [C ]
a) Analysis
b) Design
Department of CSE/IT
32
c) Coding
d) All
b) Software product
d) None
24. _____________activity combines code generation and testing that is required to uncover
errors in the code [ B]
(A) Planning
(B)Construction
(C)Modeling
(D)None
25. ___________models describes how a system responds to internal or external events [A ]
(A)State machine
(B)Data
(C)Behavioural
(D) None
26. _________viewpoints provide detailed system requirements covering the system features
and interfaces [ B]
(A)Indirect
(B)Interactor
Department of CSE/IT
33
(C)Domain
(D)None of these
27. __________means that all services required by the user should be defined [C ]
(A) consistency
(B) contradictory
(C)completeness
(D)None of these
28. _________abstraction refers to a sequence of instructions that have a specific limited
function. [B]
(A)Data
(B)Procedural
(C)Object
(D)None of these
29. _______Model focus on the design of the business or technical process that the system must
accommodate [ C]
(A)Structural
(B) Framework
(C)Process
(D)Dynamic
30. _______is an indication of the relative interdependence among modules [A ]
(A) Coupling
(B) Cohesion
(C)Refinement
(D) None of the Above
SUBJECT:DAA
1.
If all c(i, j )s and r(i, j)s are calculated, then OBST algorithm in worst case takes one
of the following time.
(a) O(n log n)
(b) O(n3)
(c) O(n2)
(d) O(log n)
(e) O(n4).
Ans:b
2.
The following is a weighted binary tree, then what is the weighted array for the TVS
Department of CSE/IT
34
problem?
(a)
(b)
(c)
(d)
(e)
[9, 2, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 4]
[9, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 4, 6]
[9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6, 7, 4]
[9, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 6, 4]
[9, 2, 0, 0, 0, 7, 0, 0, 0, 0, 6, 4, 0, 0].
Ans:d
3.
What are the entries of the array TREE[ ] for the above weighted binary tree for the
TVS problem.
(a) [1, 2, 3, 4, 5, 6, 0, 0]
(b) [1, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 4, 5, 6]
(c) [1, 2, 3, 0, 0, 0, 0, 4, 5, 6]
(d) [1, 2, 3, 0, 0, 0, 0, 0, 4, 5, 6]
(e) [1, 2, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 5, 6].
Ans: e
4.
For a 15-puzzle problem let the initial arrangement be the following one, then answer
the questions 4 7 with the following arrangement.
10
9
12
11
13
1
2
15
4
8
5
7
14
6
3
35
(c) 8
(d) 10
(e) 13.
Ans:a
5.
The values for the position(i), position(j) where i = 14 and j =11, are
(a) 2, 8
(b) 8, 2
(c) 8, 13
(d) 2, 13
(e) 13, 8.
Ans:c
6.
7.
What is the value to find the reachability of the problem with which you can say the
solution is reachable or not?
(a) 71
(b) 72
(c) 73
(d) 69
(e) 68.
Ans:b
8.
The upper bound on the time complexity of the nondeterministic sorting algorithm is
(a) O(n)
(b) O(n log n)
(c) O(1)
(d) O( log n)
(e) O(n2).
Ans:a
9.
The worst case time complexity of the nondeterministic dynamic knapsack algorithm
is
(a) O(n log n)
Department of CSE/IT
36
(b)
(c)
(d)
(e)
O( log n)
O(n2)
O(n)
O(1).
Ans:d
10. For the LCBB solution of knapsack problem with the data (p1p4) = (10,10,12,18) and
(w1w4) = (2, 4, 6, 9) and m = 18, then the values of u(1) and (1) respectively are
(a) -38, -44
(b) -44, -38
(c) -44, -32
(d) -32, -44
(e) -32, -38.
Ans:d
11.
If for the above problem, the tree is created following the FIFOBB, then the values for
(5) and u(5) respectively are
(a) -40, -40
(b) -40, -38
(c) -40, -32
(d) -22, -32
(e) -32, -22.
Ans:a
12.
There is a chain of 20 stores; each of the store having 5 departments. Then, which of
the following is a correct representation of array size?
(a) 5 * 20
(b) 6 * 21
(c) 20 * 5
(d) 21 * 6
(e) 19 * 4
Ans:c
13.
From the following, select the valid data structure which reflects hierarchical
relationship between the elements.
(a) Graph
(b) Queue
(c) Linked list
(d) Stack
(e) Tree.
Ans:e
14.
Which of the following matrix does have high proportions of zero entries as the
elements?
(a) Inverse Matrix
(b) Sparse Matrix
(c) Determinant
Matrix
(d) Square Matrix
(e) Transpose Matrix.
Ans:b
15.
Let there is a queue whose initial values for Front and Rear are 0 and 1 respectively.
Later queue found to be having the elements 3, 2, 1, 5. If a new element is inserted in
the queue, then which of the following statements is correct?
(a) Front = 0 and Rear = 5
(b) Front = 0 and Rear = 4
(c) Front = 1 and Rear = 4
(d) Front = 1 and Rear = 5
(e) Insertion is not possible as there is no space in the queue.
Ans:a
Department of CSE/IT
37
16.
One from the following is also known as Pre-Order traversal. What that one is?
(a) LNR
(b) LRN
(c) RLN
(d) RNL
(e) NLR.
Ans:e
17.
Which of the following data structure is the best example for the multitasking
systems?
(a) Tree
(b) Queue
(c) Stack
(d) Linked List
(e) Graph.
Ans:b
18.
19.
To form the new configuration in the above problem, what best data structure is seems
to be used?
(a) Tree
(b) Queue
(c) Linked List
(d) Circular Queue (e)
Stack.
Ans:e
20.
21. What do you call the selected keys in the quick sort method?
(a) Outer key (b) Inner Key
(c) Partition key
(d) Pivot key (e) Recombine key.
Ans:d
22. Primary clustering occurs in
(a) Linear probing
(b) Quadratic probing
(c) Mid-square method (d) Order probing
Ans:a
(e) Chaining.
23. How many nodes do a full binary tree with N leaves contain?
(a) 2N nodes
(b) N nodes (c) 2N-1 nodes
(d) N-1 nodes
(e) 2(N-1) nodes.
Ans:c
24. How many nodes does a complete binary tree of level 5 have?
(a) 16 (b) 15 (c) 32
(d) 31 (e) 64.
Ans:d
25. How do you determine the cost of a spanning tree?
(a) By the sum of the costs of the edges of the tree
Department of CSE/IT
38
(b) By the sum of the costs of the edges and vertices of the tree
(c) By the sum of the costs of the vertices of the tree
(d) By the sum of the costs of the edges of the graph
(e) By the sum of the costs of the edges and vertices of the graph.
Ans:a
26. What would be the depth of tree whose level is 9?
(a) 10 (b) 8
(c) 9
(d) 11 (e) 7.
Ans:c
27. A node of a directed graph G having no out-degree and a positive in-degree is called
(a) Source node (b) Sink node
(c) Sibling node
(d) Null node (e) In-node.
Ans:a
28. The time complexity of the normal quick sort, randomized quick sort algorithms in the
worst case is
(a) O(n2), O(n log n)
(b) O(n2), O(n2)
2
(c) O(n log n), O(n )
(d) O(n log n), O(n log n)
(e) O(n log n), O(n2 log n).
Ans:b
29. Let there be an array of length N, and the selection sort algorithm is used to sort it,
how many times a swap function is called to complete the execution?
(a) N log N times
(b) log N times (c) N2 times
(d) N-1 times
(e) N times.
Ans: d
39
(a)
(c)
(e)
Ans: a
(b)
(d)
34. P, Q and R are pointer variables. The statements below are intended to swap the contents of
the nodes pointed to by P and rewrite it so that it will work as intended.
P = Q; R = Q; Q = R;
(a) R=Q; P=R; Q=R;
(b) R=P; P=P; Q=Q;
(c) P=P; P=Q; R=Q;
(d) R=P; P=Q; Q=R;
(e) P=R; R=Q; Q=R;
Ans:d
35. For defining the best time complexity, let f (n) = log n and g (n) = n, _________
(a) f (n) (g(n)), but g(n) (f(n))
(b) f (n) (g(n)), but g(n) (f(n))
(c) f (n) (g(n)), and g(n) (f(n))
(d) f (n) (g(n)), and g(n) (f(n))
(e) Cant be defined for best case.
Ans:b
36. If f, r are the front, rear pointers respectively in a circular queue then the condition
+ size) % size == 1) && ( (f != 0) || (r != -1) ) represents
(a) Queue has only one element
(b) Two Elements
(c) More than 2 elements but not full
(d) Impossible values
(e) Queue is full.
Ans:e
(( f r
37. For the following two statements, choose the correct answer.
I. n2O(n3).
II. n = ((n+1)!).
(a) (I) and (II) are TRUE
(b) (I), (II) are FALSE
(c) (I) is FALSE, but (II) is TRUE
(d) (I) is TRUE and (II) is FALSE
(e) (I) is TRUE but (II) cant be defined.
Ans:d
38. The statement head->Link->Link->Link = NULL terminates a linked list after its
__________ node.
(a) 2nd
(b) 4th
(c) 5th
(d) 3rd
(e) first.
Ans:d
39. For analyzing an algorithm, which is better computing time?
(a) O (100 Log N)
(b) O (N)
(c) O (2N)
(d) O (N log N)
(e) O (N2).
Ans:a
Department of CSE/IT
40
40. To implement the Round Robin algorithm, which of the following data structure is used?
(a) Stack
(b) Linear Queue
(c) Circular Queue
(d) Priority Queue
(e) Double Stack.
Ans:c
41. Let f, t: NR 0, and t (n) O (f (n)) iff t(n) c.f (n) where c is positive real constant
and
n no, then no is ___________
(a) Upper bound
(b) Lower bound
(c) Duality value
(d) Threshold value
(e) Maximum value.
Ans:d
42. In a circular queue, we can disambiguate empty from full queue by
(a) Using a gap in the array
(b) Incrementing queue positions by 2 instead of 1
(c) Keeping a count of the number of elements
(d) (a) and (c) above
(e) (a), (b), and (c) above.
Ans:d
43. In a graph, a vertex with degree one is known as ___________
(a) Pendant vertex (b) Leaf
(c) Root
(d) End vertex
Ans:a
(e) Internal.
44. Consider the usual algorithm for determining whether a sequence of parentheses is
balanced. What is the maximum number of parentheses that will appear on the stack AT
ANY ONE TIME when the algorithm analyzes: (()(())(()))
(a) 1
(b) 2
(c) 3
(d) 4
(e) 5 or more.
Ans:c
45. If a graph G = (N, E), where E= {}, then the corresponding adjacency matrix is _____
(a) Unit Matrix
(b) Identity Matrix
(c) Having Diagonal elements Zero
(d) Matrix with all 1s
(e) Zero Matrix.
Ans:e
46. Suppose we have an array implementation of the stack class, with ten items in the stack
stored at data[0] through data[9]. The SIZE is 42. Where does the push method place the
new entry in the array?
(a) data[0]
(b) data[1]
(c) data[9]
(d) data[10]
(e) data[11].
Ans:d
47. Breadth first search __________
(a) Scans each incident node along with its children.
(b) Scans all incident edges before moving to other node.
(c) Is same as backtracking
(d) Scans all the nodes in random order.
Department of CSE/IT
41
(b) Q[++r] = x;
(c) Q[r]++ =
(e) Q[r++] = x;
49. Which method of traversal does not use stack to hold nodes that are waiting to be
processed?
(a) Dept First
(b) D-search
(c) Breadth first
(d) Back-tracking
(e) Bounding.
Ans:c
50. If the characters 'D', 'C', 'B', 'A' are placed in a queue (in that order), and then removed
one at a time, in what order will they be removed?
(a) ABCD
(b) ABDC
(c) DCAB
(d) DCBA
(e) ACDB.
Ans:d
SUBJECT:COMPUTER ORGANIZATION
1) In Reverse Polish notation, expression A*B+C*D is written as
(A) AB*CD*+ (B) A*BCD*+
(C) AB*CD+* (D) A*B*CD+
[ A
2) What characteristic of RAM memory makes it not suitable for permanent storage?
(A) too slow
(B) unreliable
(C) it is volatile
(D) too bulky
[ C
[ D
4) (2FAOC)16 is equivalent to
(A) (195 084)10
(C) Both (A) and (B)
Department of CSE/IT
42
9) If (97)16 is converted into binary what is the relation between the no.of zeros
and no.of ones
(A)No.of zeros 2 more than no.of ones
(B) No.of zeros 3 more than no.of ones
(C) No.of zeros 4 more than no.of ones
(D)none
[ A
[ B
11) _________ register keeps tracks of the instructions stored in program stored in
memory.
(A) AR (Address Register)
(B) XR (Index Register)
(C) PC (Program Counter)
(D) AC (Accumulator)
[ C
12) The multiplicand register & multiplier register of a hardware circuit implementing
booth's algorithm have (11101) & (1100). The result shall be
(A) (812)10
(B) (-12)10
(C) (12)10
(D) (-812)10
[ A ]
13) A floating point number that has a 0 in the MSB of mantissa is said to have
(A) Overflow
(B) Underflow (C) Important number (D) Undefined[ B
(B) 2
(C) 5
(D7
[ B
[ A
43
format as
(A) 111011 & 100100 (B) 100100 & 111011
(C) 011011 & 100100 (D) 100100 & 011011
[ A
17) The instructions which copy information from one location to another either in the
processors internal register set or in the external main memory are called
(A) Data transfer instructions.
(B) Program control instructions.
(C) Input-output instructions.
(D) Logical instructions.
[ A ]
18 )Content of the program counter is added to the address part of the instruction in order to
obtain the effective address is called.
(A) relative address mode.
(B) index addressing mode.
(C) register mode.
(D) implied mode.
[ A ]
19) The 2s compliment form (Use 6 bit word) of the number 1010 is
(A) 111100.
(B) 110110.
(C) 110111.
(D) 1011.
21 )The maximum addressing capacity of a micro processor which uses 16 bit database & 32
bit address base is
(A) 64 K.
(B) 4 GB.
(C) both (A) & (B).
(D) None of these.
[ B ]
22) The gray code equivalent of (1011)2 is
(A) 1101.
(B) 1010.
(C) 1110.
(D) 1111.
[ D
23) Which of the following number will have same value in both sign magnitude
notation and 2s complement notation
(A) 1000 0000 (B) 1100 0000
(C) 1110 0000 (D) 1111 0000
[ B
25) A Program Counter contains a number 825 and address part of the instruction contains
the number 24. The effective address in the relative address mode, when an instruction is read
from the memory is
(A) 849.
(B) 850.
(C) 801.
(D) 802.
[ B ]
26) A system program that translates and executes an instruction simultaneously is
(A) Compiler. (B) Interpreter. (C) Assembler. (D) Operating system. [ C ]
27) Indicate which of the following is not true about an interpreter
(A)Interpreter generates an object program from the source program
(B) Interpreter is a kind of translator
(C) Interpreter analyses each source statement every time it is to be executed
(D) None of the above
[ B
Department of CSE/IT
44
[ A
[ C
[ B
[ C
(D)(0101)2
(D) (1001)2
32) Karnaugh map (K-map) technique provides a systematic method for simplifying ----------(A) multiplexers (B) lgic gates (C) Boolean expressions d) none of these .
[ C ]
33) K-map technique generally used up to --------Variables
(A)2
(B) 8
(C) 7
(D) 6
[ D
34)In a array multiplier circuit with J multiplier bits & K multiplicand bits, the number of
AND gates required are ____________
(A)J*K
(B)J+K (C)J-I
(D)K-1
[ B
]
35)Which of the following is also called the next address generator for a control memory?
(A)Program counter
(B) control address register
(C)Microprogram sequencer (D) none of the above
[ B ]
36 )A computer must at least consist of _______
(A)Data bus
(B) Address bus
(C) Control bus
(D)All of the above
[ D
[ C
38 )1KB,2KB,4KB memory chips have 10 bit address data. Bus size in each case is
(A)8,16,24
(B)8,16,32
(C)8,16,64
(D)8,16,128
[ B
(C)8257
(D)8259
[ A ]
Department of CSE/IT
45
Department of CSE/IT
46