WorksheetsGAMMASTACK SCREENING TEST SET D
Total questions: 40
Worksheet time: 42mins
In a university database, student records are stored. Each student is assigned a unique student ID, and they also have a unique email address. However, email addresses can change over time.
What is the candidate key for the "Students" table in this scenario?
Student ID
Email Address
Both Student ID and Email Address
Neither Student ID nor Email Address
You are designing an ER diagram for a university database. There are two main entities: "Student" and "Course." Students can enroll in multiple courses, and each course can have multiple students.
What type of relationship exists between Student and Course?
Many-to-Many relationship.
One-to-Many relationship.
Many-to-One relationship.
One-to-One relationship.
A queue is implemented using an array such that ENQUEUE and DEQUEUE operations are performed efficiently. Which one of the following statements is CORRECT (n refers to the number of items in the queue)?
At most one operation can be performed on O(1) time but the worst-case time for the other operation will be Ω(n)
Both operations can be performed in O(1) time
The worst-case time complexity for both operations will be Ω(n)
Worst case time complexity for both operations will be Ω(log n)
The result evaluating the postfix expression 10 5 + 60 6/ * 8 – is
284
213
142
71
What are the sequence of popped out values if the sequence of operations - push(1), push(2), pop, push(1), push(2), pop, pop, pop, push(2), pop are performed on a stack.
2, 2, 1, 1, 2
2, 2, 1, 2, 2
2, 1, 2, 2, 1
2, 1, 2, 2, 2
Put your hand on the doorknob
Turn the doorknob to the side until it unlocks the door
Push or pull the door to open it
End
..................................................
What would be an appropiate title for this algorithm?
How do you determine the cost of a spanning tree?
By the sum of costs of the edges of the tree
By the sum of the costs of the edges and vertices of the tree
By the sum of the costs of the vertices of the tree
By the sum of costs of the edges of the graph
You are given a knapsack that can carry a maximum weight of 60. There are 4 items with weights {20, 30, 40, 70} and values {70, 80, 90, 200}. What is the maximum value of the items you can carry using the knapsack?
170
200
160
90
In travelling salesman problem, we are interested in finding
shortest path from one source to multiple destinations
A salesman is expected to start from one source and by visiting all locations he/she should come back to the source in minimum time
longest available path in the graph
A Salesman is expected to complete the task in given deadline
Consider the following statements:
(i) First-in-first out types of computations are efficiently supported by STACKS.
(ii) Implementing LISTS on linked lists is more efficient than implementing LISTS on an array for almost all the basic LIST operations.
(iii) Implementing QUEUES on a circular array is more efficient than implementing QUEUES on a linear array with two indices.
(iv) Last-in-first-out type of computations are efficiently supported by QUEUES.
ii and iii are true
i and ii are true
iii and iv are true
ii and iv are true
You have to sort 1 GB of data with only 100 MB of available main memory. Which sorting technique will be most appropriate?
Heap Sort
Merge Sort
Quick Sort
All of the above
Allows computer system to be extended, with new specialized objects being created, while allowing current parts of the system to interact with new object without concern for the specific properties of the new objects.
Abstraction
Encapsulation
Generalisation
Polymorphism
Object
onsider the following two statements:
i. A hash function (these are often used for computing digital signatures) is an injective function.
ii. encryption technique such as DES performs a permutation on the elements of its input alphabet.
Which one of the following options is valid for the above two statements?
Both are false
Statement i is true and statement ii is false
Statement ii is true and statement i is false
Both are true
As a Vehicle user, we know how to use it but its internal working are not known. In OOPs Concept, this principle is known as
Encapsulation
Inheritance
Abstraction
Polymorphism
Which one of the following is a set of one or more attributes taken collectively to uniquely identify a record?
Candidate key
Sub key
Super key
Foreign key
Which of the following in true regarding Referential Integrity?
Every primary-key value must match a primary-key value in an associated table
Every primary-key value must match a foreign-key value in an associated table
Every foreign-key value must match a primary-key value in an associated table
Every foreign-key value must match a foreign-key value in an associated table
Which of the following refers to the level of data abstraction that describes exactly how the data actually stored?
Conceptual Level
Physical Level
File Level
Logical Level
Consider the following statements about process state transitions for a system using preemptive scheduling.
I. A running process can move to a ready state
II. A ready process can move to a ready state
III. A blocked process can move to a running state
IV. A blocked process can move to a ready state
Which of the above statements is TRUE?
I, II, and III only
II and III only
I, II, and IV only
I, II, III, and IV
The essential content(s) in each entry of a page table is/are:
Page frame number
Virtual page number
Both virtual page number and page frame number
Access the right information
Let m[0]…m[4] be mutexes (binary semaphores) and P[0] …. P[4] be processes. Suppose each process P[i] executes the following:
wait (m[i]); wait(m[(i+1) mode 4]);
------
release (m[i]); release (m[(i+1)mod 4]);
This could cause
Thrashing
Deadlock
Starvation, but not deadlock
None of the above
The prefix form of an infix expression p + q − r * t is:
+ pq − *rt
− +pqr * t
− +pq * rt
− + * pqrt
In a software project, COCOMO (Constructive Cost Model) is used to estimate
effort and duration based on the size of the software
size and duration based on the effort of the software
effort and cost based on the duration of the software
size, effort and duration based on the cost of the software
Match the following
P-2, Q-1. R-3, S-5
P-1, Q-4, R-2, S-5
P-2, Q-4, R-1, S-3
P-1, Q-4, R-2, S-3
Which of the following statements are TRUE about an SQL query?
P : An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause
Q : An SQL query can contain a HAVING clause only if it has a GROUP BY clause
R : All attributes used in the GROUP BY clause must appear in the SELECT clause
S : Not all attributes used in the GROUP BY clause need to appear in the SELECT clause
Q and S
R and S
P and R
P and S
In the deletion operation of max heap, the root is replaced by:
next available value in the left sub-tree.
next available value in the right sub-tree.
first element of the last level
last element of the last level
Which of the following statements is FALSE about weak entity set?
Tuples in a weak entity set are not partitioned according to their relationship with tuples in a strong entity set.
A weak entity set has no primary keys unless attributes of the strong entity set on which it depends are included
Weak entity set avoids the data duplication and consequent possible inconsistencies caused by duplicating the key of the strong entity.
Weak entities can be deleted automatically when their strong entity is deleted
Relations produced from E - R Model will always be in ________.
2 NF
1 NF
3 NF
BCNF
A common approach to normalization is to ___ the larger table into smaller tables and link them together by using relationships.
Add
Divide
Subtract
Multiply
When a relation is in 2NF and there is ___, it is in 3NF.
Transition Dependency
No Transitive Dependency
Functional Dependency
No Functional Dependency
What is TRUE about Left Outer Join?
It contains all tuples that have the same common attribute names in A and B.
Tuples in A do not match tuples in B in the left outer join.
It is denoted by ⟕.
All of the above
What is the value of the postfix expression 6 3 2 4 + – *?
a) 74
b) -18
c) 22
d) 40
In a stack, if a user tries to remove an element from empty stack it is called _________
Underflow
Stack is Empty
Overflow
None of the above
Can We Implement Stack Using Queue Data structure
Yes
No
It is a process that consists of a series of planned activities to develop or alter the Software Products
Software Development Life Cycle
Life Cycle
Development Process
Graphical Representation
The spiral model combines which two SDLC models?
waterfall & agile
agile & v-model
waterfall & iterative
Agile Software Development Process is:
Sequential
Iterative
Incremental
Iterative & Incremental both
What is Software?
Set of computer programs, procedures and possibly is a collection of instructions that enable the user to interact with a computer
A set of compiler instructions
A mathematical formula
Things which we can touch
During software development, which factor is most crucial ?
People
Product
Process
Project
