UGC NET JRF November 2020 Paper-2

Question 1
A company has a choice of two language L1 and L2 to develop a software for their client. Number of LOC required to develop an application in L2is thrice the LOC in language L1. Also, software has to be maintained for the next 10 years. Various parameters for two languages are given below to decide which language should be preferred for development.
PARAMETER L1 L2
Man-year needed for development LOC/1000 LOC/1000
Development cost Rs.70,000 Rs.90,000
Cost of Maintenance per year Rs.1,00,000 Rs.40,000
Total cost of the project includes the cost of development and maintenance. What is the LOC for L1for which cost of developing the software with both languages must be the same?
A
2000
B
6000
C
3000
D
5000
       Software-Engineering       LOC
Question 1 Explanation: 
Let LOC of L1=X, so LOC of L2=3X
→ (X/1,000)*70,000 + 10*1,00,000 = (3X/1,000)*90,000 + 10*40,000
→70X+1000000=270X+400000
→200X=600000
→X=3000
Question 2
The data node and name node in HADOOP are
A
Worker Node and Master Node respectively
B
Master Node and Worker Node respectively
C
Both Worker Nodes
D
Both Master Nodes
       Big-Data       Hadoop
Question 2 Explanation: 
Explanation: Hadoop Distributed File System(HDFS) has a master/slave architecture. An HDFS cluster consists:
1. NameNode, a master server that manages the file system namespace and regulates access to files by clients.
2. DataNodes, usually one per node in the cluster, which manage storage attached to the nodes that they run on. HDFS exposes a file system namespace and allows user data to be stored in files.
Internally, a file is split into one or more blocks and these blocks are stored in a set of DataNodes. The NameNode executes file system namespace operations like opening, closing, and renaming files and directories. It also determines the mapping of blocks to DataNodes. The DataNodes are responsible for serving read and write requests from the file system’s clients. The DataNodes also perform block creation, deletion, and replication upon instruction from the NameNode.
Question 3
Suppose you have a Linux file system where the block size is 2K bytes, a disk address is 32 bits, and i-node contains the disk addresses of the first 12 direct blocks of file, a single indirect block, and a double indirect block. Approximately, what is the largest file that can be represented by an i-node?
A
513 Kbytes
B
513 MBytes
C
537 Mbytes
D
537 KBytes
       Operating-Systems       File-system
Question 3 Explanation: 
Question 4
Match List I with List II.,

Choose the correct answer from the options given below:
A
A-II, B-IV, C-III, D-I
B
A-IV, B-I, C-II, D-III
C
A-II, B-I, C-IV, D-III
D
A-III, B-IV, C-I, D-II
       Database-Management-System       ER-Model
Question 4 Explanation: 
Question 5
Which of the following statements is true?
A
The union of two context free languages is context free.
B
The intersection of two context free languages is context free.
C
The complement of a context free language is context free.
D
If a language is context free, it can always be accepted by a deterministic pushdown automaton.
       Theory-of-Computation       Context-Free-Language
Question 5 Explanation: 

Option 4 is incorrect because CFL includes both DCFL and NDCFL and NDCFL are accepted by only non-deterministic pushdown automata, they can’t be accepted by Deterministic PDA.
Question 6
Consider the following languages: L1={aźZ| ź is an integer} L2={a | ź>0} L3={ωω| ω{a,b}*} Which of the languages is (are) regular?
A
L1 and L2 only
B
L1 and L3 only
C
L1 only
D
L2 only
E
None of the above
       Theory-of-Computation       Regular-Language
Question 6 Explanation: 
A language is Regular language only if it creates an AP series.
Here only statement 2 makes an AP series. Example: L be a lanusage where i=1 and Z>= 0 then L ={ epsilon, a, aa, aaa, aaaa,..................} which is an AP. And Finite automata for this will be

Question 7
Arrange the following types of Cohesion from best to worst type. A) Logical Cohesion B) Sequential Cohesion C) Communication Cohesion D) Temporal Cohesion E) Procedural Cohesion Choose the correct answer from the options given below:
A
A➡ D➡ E➡ C➡ B
B
A ➡ E ➡D ➡ C ➡ B
C
B ➡ E ➡ C ➡ D ➡ A
D
B ➡ C ➡ E ➡ D ➡ A
       Software-Engineering       Coupling-and-Cohesion
Question 7 Explanation: 
➡ Cohesion Cohesion is a measure of the relative functional strength of a module.
➡ Types of cohesion :
➡ Coincidentally cohesive(LOW) a module that performs a set of tasks that relate to each other loosely, if at all. Such modules are termed coincidentally cohesive.
➡ Logically cohesive A module that performs tasks that are related logically (e.g., a module that produces all output regardless of type) is logically cohesive.
➡ Temporal cohesion When a module contains tasks that are related by the fact that all must be executed with the same span of time, the module exhibits temporal cohesion
➡ Procedural cohesion When processing elements of a module are related and must be executed in a specific order, procedural cohesion exists.
➡ Communicational cohesion When all processing elements concentrate on one area of a data structure, communicational cohesion is present.
➡ Sequential Cohesion If the function of the module forms part of sequence, where the output of one function is the input to another function.
➡ Functional Cohesion(HIGH): In this, different elements of the module cooperate with each other to achieve a single function.
Question 8
Consider the statement below. A person who is radical (R) is electable (E) if he/she is conservative (C), but otherwise is not electable. Few probable logical assertions of the above sentence are given below.,

Which of the above logical assertions are true?
Choose the correct answer from the options given below:
A
(B) only
B
(C) only
C
(A) and (C) only
D
(B) and (D) only
       Artificial-intelligence       Propositional-Logic
Question 8 Explanation: 
1. (R ∧E) ↔C
This is not equivalent. It says that all (and only) conservatives are radical and electable.
2. R →(E ↔C)
This one is equivalent. if a person is a radical then they are electable if and only if they are conservative.
3. R →((C →E) ∨¬E)
This one is vacuous. It’s equivalent to ¬R ∨ (¬C ∨ E ∨ ¬E), which is true in all interpretations.
4.R ⇒ (E ⇐⇒ C) ≡ R ⇒ ((E ⇒ C) ∧ (C ⇒ E))
≡ ¬R ∨ ((¬E ∨ C) ∧ (¬C ∨ E))
≡ (¬R ∨ ¬E ∨ C) ∧ (¬R ∨ ¬C ∨ E))
Question 9
Consider the following argument with premise
A
This is a valid argument.
B
Steps (C) and (E) are not correct inferences
C
Steps (D) and (F) are not correct inferences
D
Step (G) is not a correct inference
       Artificial-intelligence       Propositional-Logic
Question 10
Simplified expression/s for following Boolean function F(A,B,C,D)=Σ(0,1,2,3,6,12,13,14,15) is/are A) A'B'+AB+A'C'D' B) A'B'+AB+A'CD' C) A'B'+AB+BC'D' D) A'B'+AB+BCD' Choose the correct answer from the options given below:
A
(A) only
B
(B) only
C
(A) and (B) only
D
(B) and (D) only
       Digital-Logic-Design       K-Map
Question 10 Explanation: 
Question 11
Given below are two statements: Statement I: In Caesar Cipher each letter of Plain text is replaced by another letter for encryption. Statement II: Diffie-Hellman algorithm is used for exchange of secret key. In the light of the above statements, choose the correct answer from the options given below
A
Both Statement I and Statement II are true
B
Both Statement I and Statement II are false
C
Statement I is correct but Statement II is false
D
Statement I is incorrect but Statement II is true
       Computer-Networks       Network-Security
Question 11 Explanation: 
In cryptography, a Caesar cipher, also known as Caesar's cipher, the shift cipher, Caesar's code or Caesar shift, is one of the simplest and most widely known encryption techniques. It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter with some fixed number of positions down the alphabet. For example, with a left shift of 3, D would be replaced by A, E would become B, and so on. The method is named after Julius Caesar, who used it in his private correspondence.
Diffie–Hellman key exchange is a method of securely exchanging cryptographic keys over a public channel and was one of the first public-key protocols as conceived by Ralph Merkle and named after Whitfield Diffie and Martin Hellman
Question 12
Consider a single-level page table system, with the page table stored in the memory. If the hit rate to TLB is 80%, and it takes 15 nanoseconds to search the TLB, and 150 nanoseconds to access the main memory, then what is the effective memory access time, in nanoseconds?
A
185
B
195
C
205
D
175
       Operating-Systems       Virtual Memory
Question 12 Explanation: 
Effective memory access time =0.8(15+150)+0.2(15+150+150)
=132+63
=195 ns
Question 13
A non-pipeline system takes 50ns to process a task. The same task can be processed in a six-segment pipeline with a clock cycle of 10ns. Determine approximately the speedup ratio of the pipeline for 500 tasks.
A
6
B
4.95
C
5.7
D
5.5
       Computer-Organization       Pipelining
Question 13 Explanation: 
Time required to execute 500 tasks without pipelining =500*50 ns=25000 ns
Time required to execute 500 tasks with 6-stage pipelining =(1*6*10)+(499*1*10)
=60+4990
=5050
Question 14
Given below are two statements: Statement I: 5 divides n5-n whenever n is a nonnegative integer. Statement II: 6 divides n3-n whenever n is a nonnegative integer. In the light of the above statements, choose the correct answer from the options given below
A
Both Statement I and Statement II are correct
B
Both Statement I and Statement II are incorrect
C
Statement I is correct but Statement II is incorrect
D
Statement I is incorrect but Statement II is correct
       Engineering-Mathematics       Number-Systems
Question 14 Explanation: 
Statement 1 is true. For example: Let n= 2 then n5-n will be 30 which is divisible by 5. Hence This statement is correct.
Statement 2 is also correct. For example: Let n= 2 then n3-n will be 6 which is divisible by 6. Hence This statement is correct.
Question 15
Which of the following cloud concept/s is/are related to pooling and sharing of resources? A) Virtual Memory B) Service C) Virtualization Choose the correct answer from the options given below:
A
(C) only
B
(A) and (B) only
C
(A) only
D
(B) only
       Operating-Systems       Distributed-Operating-System
Question 15 Explanation: 
The availability of high-capacity networks, low-cost computers and storage devices as well as the widespread adoption of hardware virtualization, service-oriented architecture and autonomic and utility computing has led to growth in cloud computing.
Cloud computing is the on-demand availability of computer system resources, especially data storage (cloud storage) and computing power, without direct active management by the user. The term is generally used to describe data centers available to many users over the Internet
Question 16
Using 'RSA' public key cryptosystem, if p=3, q=11 and d=7, find the value of e and encrypt the number '19'
A
20,19
B
33,11
C
3,28
D
77,28
       Computer-Networks       RSA-algorithm
Question 16 Explanation: 
n= P*q
n= 3*11
n=33
ф(n) = (p-1)(q-1)
ф(n) = 2*10
ф(n) = 20
E * d=1 mod ф(n)
e*7=1 mod 20
Now find the value of “e” in such a way that if we multiply the value of “e” with 7 then by dividing it with 20 mod value should come as “1”.
So if e=3 then the above condition can be satisfied hence option C is the right answer. Encrypted value = (Message)e mod n = (19)3 mod 33 = 28
Question 17
Consider the following regular expressions: a) r=a(b+a)* b) s=a(a+b)* c) t=aa*b Choose the correct answer from the options given below based on the relation between the languages generated by the regular expressions above:
A
L(r)⊆L(s)⊆L(t)
B
L(r)⊇L(s)⊇L(t)
C
L(r)⊇L(t)⊇L(s)
D
L(s)⊇L(t)⊇L(r)
       Theory-of-Computation       Regular-Expression
Question 17 Explanation: 
r={a,aa,ab,aaa,aab,aba,aaab,......}
s={aa,ab,aaa,aab,aba,aaab,......}
t={ab,aab,aaab,....}
If you notice then r⊇s⊇t
Question 18
Firewall is a device that filters access to the protected network from the outside network. Firewall can filter the packets on the basis of (A) Source IP address (B) Destination IP Address (C) TCP Source Port (D) UDP Source Port (E) TCP Destination Port Choose the correct answer from the options given below:
A
(A), (B) and (C) only
B
(B) and (E) only
C
(C) and (D) only
D
(A), (B), (C), (D) and (E) only
       Computer-Networks       Network-Security
Question 18 Explanation: 
In computing, a firewall is a network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules. A firewall typically establishes a barrier between a trusted network and an untrusted network, such as the Internet.
Packets may be filtered by source and destination IP addresses, protocol, source and destination ports. The bulk of Internet communication in 20th and early 21st century used either Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) in conjunction with well-known ports, enabling firewalls of that era to distinguish between specific types of traffic such as web browsing, remote printing, email transmission, file transfer.
Question 19
Assuming that the system call fork () never fails, consider the following C programs P1 and P2 executed on a UNIX/ Linux system:

Statement I: P1 displays “Happy” 8 times.
Statement II: P2 displays “Happy” 12 times.
In the light of the above statements, choose the correct answer from the options given below:
A
Both Statement I and Statement II are true
B
Both Statement I and Statement II are false
C
Statement I is correct but Statement II is false
D
Statement I is incorrect but Statement II is true
       Operating-Systems       System-Calls
Question 19 Explanation: 
As we know that “n” fork calls will lead to 2n-1child processes. Hence Total no. of process will be 2n-1+1(We added 1 for the parent process).
Now since in P1 all 3 fork calls are done before the printf statement so all 8( 23-1+1) processes will execute the Printf statement. Hence in P1 Printf statement will be executed for 8 times.
Question 20
Consider a machine with a byte addressable main memory of 2616 bytes and block size of 8 bytes. Assume that a direct mapped cache consisting of 32 lines is used with this machine. How many bits will be there in Tag, line and word field of format of main memory addresses?
A
8,5,3
B
8,6,2
C
7,5,4
D
7,6,3
       Computer-Organization       Cache
Question 20 Explanation: 
Question 21
Let G be a simple undirected graph, TDbe a DFS tree on G, and TB be the BFS tree on G. Consider the following statements. Statement I: No edge of G is a cross with respect to TD Statement II: For every edge (u,v) of G, if u is at depth i and v is at depth j in TB then |i-j|=1 In the light of the above statements, choose the correct answer from the options given below
A
Both Statement I and Statement II are true
B
Both Statement I and Statement II are false
C
Statement I is correct but Statement II is false
D
Statement I is incorrect but Statement II is true
       Data-Structures       BFS-and-DFS
Question 21 Explanation: 
I. TRUE: Undirected graphs do not have cross edges in DFS. But can have cross edges in directed graphs.
II. FALSE: Just draw a triangle ABC. Source is A. Vertex B and C are at the same level at distance 1. There is an edge between B and C too. So here |i - j| = |1 - 1| = 0.
Question 22
The process of removing details from a given state representative is called___.
A
Extraction
B
Mining
C
Selection
D
Abstraction
       Database-Management-System       Data-ware-housing
Question 22 Explanation: 
Abstraction: the process of removing physical, spatial, or temporal details or attributes in the study of objects or systems to focus attention on details of greater importance; it is similar in nature to the process of generalization.
Data extraction is the act or process of retrieving data out of (usually unstructured or poorly structured) data sources for further data processing or data storage (data migration).
Data mining is a process of discovering patterns in large data sets involving methods at the intersection of machine learning, statistics, and database systems.
Question 23
What kind of clauses are available in conjunctive normal form?
A
Disjunction of literals
B
Disjunction of variables
C
Conjunction of literals
D
Conjunction of variables
       Digital-Logic-Design       Logic-Gates
Question 23 Explanation: 
In Boolean logic, a formula is in conjunctive normal form (CNF) or clausal normal form if it is a conjunction of one or more clauses, where a clause is a disjunction of literals; otherwise put, it is a product of sums or an AND of ORs.
Question 24
Find the lexicographic ordering of the bit strings given below based on the ordering 0 < 1. A) 001 B) 010 C) 011 D) 0001 E) 0101 Choose the correct answer from the options given below:
A
001<010<011<0001<0101
B
0001<001<010<0101<011
C
0001<0101<001<010<011
D
001<010<0001<0101<011
       Algorithms       Sorting
Question 24 Explanation: 
To find the lexicographic order of given strings will be:
0001<001<010<0101<011
Note: Lexicographical order is nothing but dictionary based order.
Question 25
Given below are two statements: Statement I: hardwired control unit can be optimized to produce fast mode of operation. Statement II: Indirect addressing mode needs two memory references to fetch the operand. In the light of the above statements, choose the correct answers from the options given below
A
Both Statement I and Statement II are true
B
Both Statement I and Statement II are false
C
Statement I is correct but Statement II is false
D
Statement I is incorrect but Statement II is true
       Computer-Organization       Addressing-Modes
Question 25 Explanation: 
Hardwired Unit:
It can be optimized to produce fast modes of operations.
It uses a large number of registers and because of that it is costly.
Instruction size in the Hardwired unit is fixed.
It has a small number of addressing modes.
Indirect Addressing mode:
The address part is the binary equivalent of 300. The control goes to address 300 to find the address of the operand. The address of the operand in this case is 1350. The operand found in address 1350 is then added to the content of AC. The indirect address instruction needs two references to memory to fetch an operand. The first reference is needed to read the address of the operand; the second is for the operand itself.
Question 26
Given below are two statements: Statement I: A genetic algorithm is a stochastic hill climbing search in which a large population of states is maintained. Statement II: In a nondeterministic environment, agents can apply AND-OR search to generate containing plans that reach the goal regardless of which outcomes occur during execution. In the light of the above statements, choose the correct answers from the options given below
A
Both Statement I and Statement II are true
B
Both Statement I and Statement II are false
C
Statement I is correct but Statement II is false
D
Statement I is incorrect but Statement II is true
       Artificial-intelligence       Hill-Climbing-Algorithm
Question 26 Explanation: 
In a genetic algorithm, a population of candidate solutions (called individuals, creatures, or phenotypes) to an optimization problem is evolved toward better solutions. Each candidate solution has a set of properties (its chromosomes or genotype) which can be mutated and altered; traditionally, solutions are represented in binary as strings of 0s and 1s, but other encodings are also possible.
In nondeterministic environments, percepts tell the agent which of the possible outcomes has actually occurred.Solutions for nondeterministic problems can contain nested if-then-else statements that create a tree rather than a sequence of actions
Question 27
Match List I with List II
let R1 = {(1,1), (2,2), (3,3)} and R2 = {(1,1), (1,2), (1,3), (1,4)}

Choose the correct answer from the options given below:
A
A-I, B-II, C-IV, D-III
B
A-I, B-IV, C-III, D-II
C
A-I, B-III, C-II, D-IV
D
A-I, B-IV, C-II, D-III
       Engineering-Mathematics       Set-Theory
Question 27 Explanation: 
Question 28
Consider the following pseudo-code fragment, where a and b are integer variables that have been initialized: /* Pre-conditions: (a>1∧ a<b) */ /* Assume that overflow never occurs */ int x=0; int p=1; while (p<b) { p=p*a; x=x+1; } When the while loop terminates, what will be the value of x in terms of a and b?
A
ab
B
ba
C
⌊logab⌋ /* ⌊ ⌋ means floor */
D
⌈logab⌉ /* ⌈ ⌉ means ceil */
E
None of the above
       Programming       Control-Statement
Question 29
Which of the following statements are true? A) Minimax search is breadth-first; it processes all the nodes at a level before moving to a node in the next level. B) The effectiveness of the alpha-beta pruning is highly dependent on the order in which the states are examined. C) The alpha-beta search algorithm computes the same optimal moves as the minimax algorithm. D) Optimal play in games of imperfect information does not require reasoning about the current and future belief states of each player. Choose the correct answer from the options given below:
A
(A) and (C) only
B
(A) and (D) only
C
(B) and (C) only
D
(C) and (D) only
       Artificial-intelligence       Alpha-Beta pruning
Question 29 Explanation: 
Minimax is a decision rule used in artificial intelligence, decision theory, game theory, statistics, and philosophy for minimizing the possible loss for a worst case (maximum loss) scenario.
Optimal decision in deterministic, perfect information games
Idea : choose the move resulting in the highest minimax value
Completeness: Yes if the tree is finite
Optimality: Yes, against an optimal opponent.
Time Complexity: O(bm)
Space Complexity: O(bm) – depth first exploration.
Hence Statement (A) is true.
Statement (B):
Alpha Bound of J:
→ The max current The max current val of all MAX ancestors of J of all MAX ancestors of J
→ Exploration of a min node, J, Exploration of a min node, J, is stopped when its value is stopped when its value equals or falls below alpha. equals or falls below alpha.
→ In a min node, we n node, we update beta update beta
Beta Bound of J:
→ The min current The min current val of all MIN ancestors of J of all MIN ancestors of J
→ Exploration of a Exploration of a max node, J ax node, J, is stopped when its stopped when its value equals or exceeds beta equals or exceeds beta
→ In a max node, we update a ax node, we update alpha
Pruning does not affect the final result
Does ordering affect the pruning process?
Best case O(bm/2)
Random (instead of best first search) - O(b3m/4)
Hence statement (B) is false.
Statement C: This statement is true.
Statement D: This statement is false because past exploration information is used from transposition tables.
Question 30
Match list I and List II

Choose the correct answer from the options given below:
A
A-I, B-II, C-III, D-IV
B
A-II, B-IV, C-III, D-I
C
A-II, B-IV, C-I, D-III
D
A-IV, B-III, C-II, D-I
       Computer-Organization       I/O-handling
Question 30 Explanation: 
Handshaking: Handshaking provides two lines, strobe and acknowledgment. Sender uses a strobe line to send control signal to receiver informing him about the data transmission and receiver uses acknowledgement line to send control signal to sender acknowledging him that he is ready to receive the data.
Programmed input–output is a method of data transmission between a central processing unit (CPU) and a peripheral device. Each data item transfer is initiated by an instruction in the program, involving the CPU for every transaction. It requires the CPU to check the I/O flag & perform transfer.
Interrupt-initiated I/O: In interrupt driven I/O CPU checks the status of interrupt flag before execution of each instruction.When I/O have data to send it generates an interrupt informing CPU that device is ready for transfer
I/O processor : It has local memory & control large set of I/O devices
Question 31
Match List I with List II With reference to CMM developed by Software Engineering Institute (SEI)                List I                                       List II A) INITIAL                      (I) Process measurement B) REPEATABLE            (II) Process definition C) DEFINED                  (III) Project management D) MANAGED              (IV) AD HOC Choose the correct answer from the options given below:
A
A-III, B-IV, C-II, D-I
B
A-IV, B-III, C-I, D-II
C
A-IV, B-III, C-II, D-I
D
A-III, B-IV, C-I, D-II
       Software-Engineering       CMMI
Question 31 Explanation: 
Level 1: Initial. The software process is characterized as ad hoc and occasionally even chaotic. Few processes are defined, and success depends on individual effort.
Level 2: Repeatable. Basic project management processes are established to track cost, schedule, and functionality. The necessary process discipline is in place to repeat earlier successes on projects with similar applications.
Level 3: Defined. The software process for both management and engineering activities is documented, standardized, and integrated into an organization wide software process. All projects use a documented and approved version of the organization's process for developing and supporting software. This level includes all characteristics defined for level 2.
Level 4: Managed. Detailed measures of the software process and product quality are collected. Both the software process and products are quantitatively understood and controlled using detailed measures. This level includes all characteristics defined for level 3.
Level 5: Optimizing. Continuous process improvement is enabled by quantitative feedback from the process and from testing innovative ideas and technologies. This level includes all characteristics defined for level 4.
Question 32
Which among the following statement(s) is (are) true? A) A hash function takes a message of arbitrary length and generates a fixed length code. B) A hash function takes a message of fixed length and generates a code of variables. C) A hash function may give the same value for distinct messages. Choose the correct answer from the options given below:
A
(A) only
B
(B) and (C) only
C
(A) and (C) only
D
(B) only
       Data-Structures       Hashing
Question 32 Explanation: 
A hash function H accepts a variable-length block of data M as input and produces a fixed-size hash value h = H(M).
In general terms, the principal object of a hash function is data integrity. A change to any bit or bits in M results, with high probability, in a change to the hash code.
Cryptographic hash function should have following two properties:
➡The one-way property: It should be computationally infeasible to find the data object that maps to a pre-specified hash result.
➡Collision-free property: No two data objects should map to the same hash result
Because of these characteristics, hash functions are often used to determine whether or not data has changed.
Question 33
To create an object-behavioral model, the analyst performs the following steps: (A) Evaluates all use-cases (B) Build state transition diagram for the system (C) Reviews the object behaviour model to verify accuracy and consistency (D) Identify events that do not derive the interaction sequence. Choose the correct answer from the options given below:
A
(A), (B) and (C) only
B
(A), (B) and (D) only
C
(B), (C) and (D) only
D
(A), (C) and (D) only
       Software-Engineering       OOAD-diagrams
Question 33 Explanation: 
Evaluate all use cases.
Build state transition diagrams for the systems.
Review the object behavior model to verify accuracy and consistency.
Question 34
Consider a hypothetical machine with 3 pages of physical memory, 5 pages of virtual memory, and < A,B,C,D,A,B,E,A,B,C,D,E,B,A,B> as the stream of page reference by an application. if P and Q are the number of page faults that the application would incur with FIFO and LRU page replacement algorithms respectively, then (P,Q)=____(Assuming enough space for storing 3 page frames)
A
(11,10)
B
(12,11)
C
(10,11)
D
(11,12)
       Operating-Systems       Page-Replacement-algorithm
Question 34 Explanation: 
A, B, C, D, A, B, E, A, B, C, D, E, B, A, B
Question 35
Which of the following statements are true? A) A sentence ∝ entails another sentence ß if ß is true in few words where is true. B) Forward chaining and backward chaining are very natural reasoning algorithms for knowledge bases in Horn form. C) Sound inference algorithms derive all sentences that are entailed. D) Propositional logic does not scale to environments of unbounded size. Choose the correct answer from the options given below:
A
(A) and (B) only
B
(B) and (C) only
C
(C) and (D) only
D
(B) and (D) only
       Artificial-intelligence       Forward-backward-chaining
Question 35 Explanation: 
Statement A is false : The relationship of entailment between sentence is crucial to our understanding of reasoning. A sentence α entails another sentence β if β is true in all world where α is true. Equivalent definitions include the validity of the sentence α⇒β and the unsatisfiability of sentence α∧¬β.
Statement D is false:Propositional logic does not scale to environments of unbounded size because it lacks the expressive power to deal concisely with time, space and universal patterns of relationships among objects.
Statement B is true:
Refer the below link:
https://www.iiia.csic.es/~puyol/IAGA/Teoria/07-AgentsLogicsII.pdf Statement C is true:
Sound/truth preserving: An inference algorithm that derives only entailed sentences. Soundness is a highly desirable property. (e.g. model checking is a sound procedure when it is applicable.)
Question 36
A Software project was estimated at 864 Function Points. A six person team will be assigned to a project consisting of a requirement gathering person, one designer, two programmers and two testers. The salary of the designer is ₹70,000 per month, requirement gatherer is ₹50,000 per month, programmer is ₹60,000 per month and a tester is ₹60,000 per month. Average productivity for the team is 12 FP per person month. Which of the following represents the projected cost of the project?
A
₹33,20,000
B
₹43,20,000
C
₹33,10,000
D
₹22,10,000
       Software-Engineering       Functional-Points
Question 36 Explanation: 
Given data, -- Functional Point(FP)=864
-- Team=6 persons
-- Average each person(FP) productivity=12
-- Designer month salary=70,000
-- Programmers month salary=2*60,000
-- Tester month salary=2*60,000
-- Requirement gatherer=50,000
-- projected cost of project=?
Step-1: Total number of months=Functional Point(FP) / (Team* Average each person(FP) productivity)
= 864 / (6*12)
= 864 / 72
= 12 months
Step-2: Total cost of the project= (one Designer month salary + 2*Programmers month salary + 2*tester month salary + one Requirement gatherer) * Total number of months
= (70000 + 2 * 60000 + 2*60000 + 50000) * 12
= ₹ 43,20,000
Question 37
Arrange the following types of machine in descending order of complexity. (A) SISD (B) MIMD (C) SIMD Choose the correct answer from the options given below:
A
A, B, C
B
C, B, A
C
B, C, A
D
C, A, B
       Computer-Organization       I/O-Devices
Question 37 Explanation: 
MIMD > SIMD > SISD
Question 38
Consider the following statements: A) Any tree is 2-colorable B) A graph G has no cycles of even length if it is bipartite C) A graph G is 2-colorable if is bipartite D) A graph G can be colored with d+1 colors if d is the maximum degree of any vertex in the graph G E) A graph G can be colored with O(log|v|) colors if it has O(|v|) edges. Choose the correct answer from the options given below:
A
(C) and (E) are incorrect
B
(B) and (C) are incorrect
C
(B) and (E) are incorrect
D
(A) and (D) are incorrect
       Data-Structures       Graphs-and-Tree
Question 38 Explanation: 
→ Bipartite graph: A graph is bipartite iff the vertices can be partitioned into two sets such that there is no edge between any pair of vertices in the same set.
→ An even cycle graph is always 2-colourable while an odd cycle graph is 3-colourable.
→ A cycle of odd length has chromatic number 3. The chromatic number of any graph must be at least as big as the chromatic number of any of its sub-graphs, so a graph containing an odd cycle can’t be bipartite.
→ Let G be a 2-colorable graph, which means we can color every vertex either red or blue, and no edge will have both endpoints colored the same color. Let A denote the subset of vertices colored red, and let B denote the subset of vertices colored blue. Since all vertices of A are red, there are no edges within A, and similarly for B. This implies that every edge has one endpoint in A and the other in B, which means G is bipartite.
→ Statement E is false because If a graph G has O(√|V|) edges, then we can color G with O(√|V|) colors.
Question 39
Given below are different properties of 3D projections from A.D. Identify the correct order on the basis of property true of (i) a perspective projection only (ii) an orthographic projection only (iii) both orthographic and projective transformations and (iv) neither orthographic nor projective transformation, respectively. (A) Straight lines are mapped to straight lines. (B) Distance and angles are (in general) preserved. (C) Far away objects appear the same size as closer ones. (D) Requires homogeneous coordinates in order for it to be encoded into linear transformation. Choose the correct answer from the options given below:
A
D, C, B, A
B
B, C, D, A
C
D, C, A, B
D
C, D, B, A
       Computer-Graphics       Projections
Question 40
Which of the following statements with respect to K-segment pipelining are true? A) Maximum speedup that a pipeline can provide is k theoretically. B) It is impossible to achieve maximum speedup k in the k-segment pipeline. C) All segments in the pipeline take the same time in computation. Choose the correct answer from the options given below:
A
(A) and (B) only
B
(B) and (C) only
C
(A) and (C) only
D
(A), (B) and (C)
       Computer-Organization       Pipelining
Question 40 Explanation: 
Pipelining : overlapping execution – Parallelism improves performance.
The aim of using pipelining is to use a single clock per instruction(CPI) which automatically improves performance.
Statement A is true because

This shows that the theoretical maximum speedup that a pipeline can provide is k, where k is the number of segments in the pipeline.

Statement B is true because
k*efficiency= speedup.
Speedup can’t be equals to K till efficiency becomes 1 and in real time environment efficiency can't become 1 because of many reasons like delay at intermediate buffers, different times taken by different segments to perform their sub operations which causes all other segments to waste time while waiting for the next clock.
Statement C is wrong because different segments can take different times to complete their sub operations.
Question 41
Consider the following recursive Java function f that takes two long arguments and returns a float value: Which of the following real values best approximates the value of f(1,3)?
A
0.2
B
0.4
C
0.6
D
0.8
       Programming       Functions
Question 42
Consider the undirected graph below:

Using Prim’s algorithm to construct a minimum spanning tree starting with node a, which one of the following sequences of edges represents a possible order in which the edges would be added to construct the minimum spanning tree?
A
(a,b), (a,h), (g,h), (f,g), (c,f), (c,i), (c,d), (d,e)
B
(a,b), (b,h), (g,h), (g,i), (c,i), (c,f), (c,d), (d,e)
C
(a,b), (b,c), (c,i), (c,f), (f,g), (g,h), (c,d), (d,e)
D
(a,b), (g,h), (g,f), (c,f), (c,i), (f,e), (b,c), (d,e)
E
A and C
       Algorithms       Minimum-Spanning-Tree
Question 42 Explanation: 


The final sequence is a-b, b-c, c-i, c-f, f-g, g-h, c-d, d-e
Question 43
Match List-I with List-II. List-I gives 33 matrices representing 2D transformations and List-II shows the corresponding transformation diagrams.

Choose the correct answer from the options given below:
A
A-IV, B-II, C-III, D-I
B
A-IV, B-III, C-II, D-I
C
A-III, B-II, C-IV, D-I
D
A-II, B-IV, C-III, D-I
       Computer-Graphics       Transformations
Question 44
Modifying the software by restructuring is called
A
Adaptive maintenance
B
Corrective maintenance
C
Perfective maintenance
D
Preventive maintenance
       Software-Engineering       Software-Reengineering
Question 44 Explanation: 
Four types of change are encountered during the support phase:
→ Correction. Even with the best quality assurance activities, it is likely that the customer will uncover defects in the software. Corrective maintenance changes the software to correct defects.
→ Adaptation. Over time, the original environment (e.g., CPU, operating system, business rules, external product characteristics) for which the software was developed is likely to change. Adaptive maintenance results in modification to the software to accommodate changes to its external environment.
→ Enhancement. As software is used, the customer/user will recognize additional functions that will provide benefit. Perfective maintenance extends the software beyond its original functional requirements.
→ Prevention. Computer software deteriorates due to change, and because of this, preventive maintenance, often called software reengineering(restructuring), must be conducted to enable the software to serve the needs of its end users. In essence, preventive maintenance makes changes to computer programs so that they can be more easily corrected, adapted, and enhanced.
Question 45
Which of the following statements with respect to the multiprocessor system are true? A) Multiprocessor system is controlled by one operating system. B) In a Multiprocessor system, multiple computers are connected by means of communication lines. C) Multiprocessor system is classified as multiple instruction streams and multiple data stream systems. Choose the correct answer from the options given below
A
(A) only
B
(A) and (B) Only
C
(A) and (C) only
D
(B) and (C) only
       Computer-Organization       Microprocessor
Question 45 Explanation: 
A multiprocessor is a computer system having two or more processing units (multiple processors) each sharing main memory and peripherals, in order to simultaneously process programs.
FALSE: Multiprocessor systems are controlled by one or more operating systems. TRUE: In a Multiprocessor system, multiple computers are connected by the means of communication lines.
TRUE: Multiprocessor system is classified as multiple instruction streams and multiple data stream systems.
Question 46
What is the radix of the numbers if the solution to the quadratic equation x2-10x+26=0 is x=4 and x=7?
A
8
B
9
C
10
D
11
       Digital-Logic-Design       Number-Systems
Question 46 Explanation: 
Question 47
The following program is stored in the memory unit of the basic computer. What is the content of the accumulator after the execution of the program? (All location numbers listed below are in hexadecimal).
A
1002H
B
2011H
C
2022H
D
0215H
       Computer-Organization       Machine-Instructions
Question 48
Match List I with List II

Choose the correct answer from the options given below:
A
A-I, B-III, C-IV, D-II
B
A-III, B-I, C-IV, D-II
C
A-III, B-I, C-II, D-IV
D
A-I, B-III, C-II, D-IV
E
None of the given options
       Algorithms       Time-Complexity
Question 48 Explanation: 
→ Topological sort of DAG takes (V+E) time.
→ Bellman ford single source shortest path takes O(VE) time
→ Floyd Warshall’s all pair shortest path algorithm takes O(V3) time.
→ Kruskal’s MST algorithm
The edges are maintained as a min heap.
The next edge can be obtained in O(logE) time if the graph has E edges.
Reconstruction of heap takes O(E) time.
So, Kruskal’s Algorithm takes O(ElogE) time.
The value of E can be at most O(V2).
So, O(logV) and O(logE) are the same.
General Kruskal’s algorithm: Sorted edges will take O(ElogV) and unsorted edges will take O(ElogE)
Question 49
Which of the following UML diagrams has a static view?
A
Collaboration diagram
B
Use-Case diagram
C
State chart diagram
D
Activity diagram
       Software-Engineering       UML
Question 49 Explanation: 
Use case diagram
Question 50
Given below are two statements: If two variables V1and V2 are used for clustering, then consider the following statements for k means clustering with k=3:- Statement I: If V1and V2 have correlation of 1 the cluster centroid will be in straight line. Statement II: If V1and V2 have correlation of 0 the cluster centroid will be in straight line. In the light of the above statements, choose the correct answer from the options given below
A
Both Statement I and Statement II are true
B
Both Statement I and Statement II are false
C
Statement I is correct but Statement II is false
D
Statement I is incorrect but Statement II is true
       Artificial-intelligence       Supervised-And-Unsupervised-Learning
Question 50 Explanation: 
If the correlation between the variables V1 and V2 is 1, then all the data points will be in a straight line. So, all the three cluster centroids will form a straight line as well.
Question 51
Match List I with List II List I                                                   List II A) Serial Line IP (SLIP)                                (I) Application layer B) Border Gateway Protocol (BGP)             (II) Transport layer C) User Data protocol (UDP)                       (III) Data Link layer D) Simple Network Management Protocol   (IV) Network layer Choose the correct answer from the options given below:
A
A-I, B-II, C-III, D-IV
B
A-III, B-IV, C-II, D-I
C
A-II, B-III, C-IV, D-I
D
A-III, B-I, C-IV, D-II
       Computer-Networks       ISO-OSI-layers
Question 51 Explanation: 
→ The Serial Line Internet Protocol (also SLIP) is an encapsulation of the Internet Protocol designed to work over serial ports and router connections. SLIP has largely been replaced by the Point-to-Point Protocol (PPP), which is better engineered, has more features, and does not require its IP address configuration to be set before it is established.
→ Border Gateway Protocol (BGP) is a standardized exterior gateway protocol designed to exchange routing and reachability information among autonomous systems (AS) on the Internet. BGP is classified as a path-vector routing protocol, and it makes routing decisions based on paths, network policies, or rule-sets configured by a network administrator.
→ UDP is a transport layer protocol. It uses a simple connectionless communication model. UDP provides checksums for data integrity, and port numbers for addressing different functions at the source and destination of the datagram. It has no handshaking dialogues, and thus exposes the user's program to any unreliability of the underlying network; there is no guarantee of delivery, ordering, or duplicate protection. If error-correction facilities are needed at the network interface level, an application may use Transmission Control Protocol (TCP) or Stream Control Transmission Protocol (SCTP) which are designed for this purpose.
→ Simple Network Management Protocol (SNMP) is an Internet Standard protocol for collecting and organizing information about managed devices on IP networks and for modifying that information to change device behavior. Devices that typically support SNMP include cable modems, routers, switches, servers, workstations, printers, and more.
Question 52
Given below are two statements: Statement I: The laws of nature put two fundamental limits on data rate of a channel. The H.Nyquist limit restricts the number of independent samples per second to twice the band-width in a Noiseless channel. Statement II: Shannon’s major result about noised channel is that maximum data rate of a channel whose bandwidth is H Hz, and whose signal-to-noise ratio is S/N is given by: In the light of the above statements, choose the correct answer from the options given below
A
Both Statement I and Statement II are true
B
Both Statement I and Statement II are false
C
Statement I is correct but Statement II is false
D
Statement I is incorrect but Statement II is true
       Computer-Networks       Noisy/Noiseless-Channel-Capacity
Question 52 Explanation: 
Noiseless Channel: Nyquist Bit Rate
For a noiseless channel, the Nyquist bit rate formula defines the theoretical maximum bit rate
BitRate=2 x bandwidth x 10g2L
In this formula, bandwidth is the bandwidth of the channel, L is the number of signal levels used to represent data, and BitRate is the bit rate in bits per second.
Noisy Channel: Shannon Capacity
In reality, we cannot have a noiseless channel; the channel is always noisy. In 1844, Claude Shannon introduced a formula, called the Shannon capacity, to determine the theoretical highest data rate for a noisy channel:
Capacity=bandwidth x log2(1+SNR)
In this formula, bandwidth is the bandwidth of the channel, SNR is the signal-to-noise ratio, and capacity is the capacity of the channel in bits per second. Note that in the Shannon formula there is no indication of the signal level, which means that no matter how many levels we have, we cannot achieve a data rate higher than the capacity of the channel. In other words, the formula defines the characteristics of the channel, not the method of transmission.
Question 53
Which of the following pairs of propositions are not logically equivalent?
A

B

C

D

       Artificial-intelligence       Propositional-Logic
Question 53 Explanation: 




Question 54
Let G be a directed graph whose vertex set is the set of numbers from 1 to 100. There is an edge from a vertex i to a vertex j if and only if either j=i+1 or j=3i. The minimum number of edges in a path in G from vertex 1 to vertex 100 is _______.
A
23
B
99
C
4
D
7
       Data-Structures       Graphs-and-Tree
Question 54 Explanation: 
Edge set consists of edges from i to j, using either
j = i +1
(or)
j = 3i
Second option will help us reach from 1 to 100 rapidly. The trick to solve this question is to think in the reverse way. Instead of finding a path from 1 to 100, try to find a path from 100 to 1.
So, the edge sequence with minimum number of edges is
1 → 3 → 9 → 10 → 11 → 33 → 99 → 100
which consists of 7 edges.
Question 55
Match List I with List II

Choose the correct answer from the options given below
A
A-II, B-IV, C-I, D-III
B
A-II, B-III, C-I, D-IV
C
A-III, B-II, C-IV, D-I
D
A-III, B-IV, C-II, D-I
       Artificial-intelligence       Artificial-intelligence-algorithms
Question 55 Explanation: 
Greedy best-first search algorithm always selects the path which appears best at that moment. It is the combination of depth-first search and breadth-first search algorithms.
Time Complexity: The worst case time complexity of Greedy best first search is O(bm).
Space Complexity: The worst case space complexity of Greedy best first search is O(bm). Where, m is the maximum depth of the search space.
Complete: Greedy best-first search is also incomplete, even if the given state space is finite.
Optimal: Greedy best first search algorithm is not optimal.
Note:Refer the corresponding algorithms from standard sources.
Question 56
protocols in which the sender sends one frame and then waits for an acknowledgement before proceeding for the next frame are called as___.
A
Simplex protocols
B
Unreserved simplex protocols
C
Simplex stop and wait protocols
D
restricted simplex protocols
       Computer-Networks       Sliding-Window-Protocol
Question 56 Explanation: 
If data frames arrive at the receiver site faster than they can be processed, the frames must be stored until their use. Normally, the receiver does not have enough storage space, especially if it is receiving data from many sources. This may result in either the discarding of frames or denial of service. To prevent the receiver from becoming overwhelmed with frames,we somehow need to tell the sender to slow down. There must be feedback from the receiver to the sender.
The protocol we discuss now is called the Stop-and-Wait Protocol because the sender sends one frame, stops until it receives confirmation from the receiver (okay to go ahead), and then sends the next frame. We still have unidirectional communication for data frames, but auxiliary ACK frames (simple tokens of acknowledgment) travel from the other direction.
Question 57
Given below are two statements: Statement I: Bezier curves are curves that interpolate all of their control points Statement II: A cubic bezier curve has four control points. In the light of the above statements, choose the correct answer from the options given below
A
Both statement I and Statement II are true
B
Both Statement I and Statement II are false
C
Statement I is correct but Statement II is false
D
Statement I is incorrect but Statement II is true
       Computer-Graphics       Bezier -Curves
Question 58
If f(x)=x is my friend, and p(x) = x is perfect, then the correct logical translation of the statement "some of my friends are not perfect" is _____.
A
B
C
D
       Artificial-intelligence       Propositional-Logic
Question 58 Explanation: 
Input:
f(x)=x is my friend
p(x) = x is perfect
So, they are asking about SOME. Finally, outer most parentheses will get SOME.
So, based on this we will eliminate 2 options.
They are given conditions like NOT perfect. So, we get ⌐p(x).
The final condition is ∃x(f(x)∧⌐p(x))
Question 59
Software reliability is described with respect to (A) Execution Time (B) Calendar Time (C) Clock Time Choose the correct answer from the options given below:
A
(A) and (B) only
B
(B) and (C) only
C
(A), (B) and (C)
D
(A) and (C) only
       Software-Engineering       Software-Reliabiliy
Question 59 Explanation: 
Software reliability testing is a field of software-testing that relates to testing a software's ability to function(which is related execution), given environmental conditions, for a particular amount of time(related to clock). Software reliability testing helps discover many problems in the software design and functionality.
Software reliability is also related to the ability of software to execute for a long period of time without any failure, which in turn related to calendar time.
Question 60
Suppose you are compiling on a machine with 1-byte chars, 2-byte shorts, 4-byte ints, and 8-byte doubles, and with alignment rules that require the address of every primitive data element to be integer multiple of the element's size. Suppose further that the compiler is not permitted to reorder fields; padding is used to ensure alignment. How much space will be consumed by the following array? struct { short s; char c; short t; char d; double r; int i; }A[10]; /*10 element array of struct*/
A
150 bytes
B
320 bytes
C
240 bytes
D
200 bytes
       Programming       Structure-and-Union
Question 61
Consider the following linear programming (LP):

The optimum value of the LP is
A
23
B
9.5
C
13
D
8
       LPP       Maximum-Profit
Question 62
Let L1 and L2 be languages over Σ =(a,b) represented by the regular expressions (a* + b)* and (a+b)* respectively. Which of the following is true with respect to the two languages?
A
L1 ⊂ L2
B
L2 ⊂ L1
C
L1 = L2
D
L1 ∩ L2 = ɸ
       Theory-of-Computation       Regular-Expression
Question 62 Explanation: 
(a+b)* is a universal set which can generate all the strings possible over the alphabet “a” and “b”.
(a+b)* = (a* +b)*= (a+b*)=(a*b*)*= (a* +b*)*= a*(ba*)*=b*(ab*)*
Question 63
In the context of concurrency control, a given pair of operations in a schedule is called conflict schedule if (A) At level one of the operations is write operations (B) Both the operations are performed on the same data item. (C) Both the operations are performed by different transactions. (D) Both the operations are performed on different data items Choose the correct answer from the options given below:
A
(A) and (B) only
B
(A), (B) and (C) only
C
(A), (C) and (D) only
D
(C) and (D) only
       Database-Management-System       Transactions
Question 63 Explanation: 
If you observe the problems given below then the reason behind their occurrence is having at least one write operation on the same data item by different transactions.


Question 64
Which of the following grammars is (are) ambiguous? (A) s → ss | asb | bsa | λ (B) s → asbs | bsas | λ (C) s → aAB A → bBb B → A | λ where λ denotes empty string Choose the correct answer from the options given below:
A
(A) and (C) only
B
(B) only
C
(B) and (C) only
D
(A) and (B) only
       Compiler-Design       Ambiguous-and-Unambiguous-Grammar
Question 64 Explanation: 
Statement - A is ambiguous because λ can be generated using leftmost derivations having two different parse trees.

Statement - B is not ambiguous.
Statement - C is ambiguous.

Question 65
The period of a signal is 100ms. then the frequency of this signal in kilohertz is ____?
A
10
B
10-1
C
10-2
D
10-3
       Data-Communication       Signal
Question 65 Explanation: 
T=100ms
= (100)10-3 sec
=10-1 sec
F=1/T
F=1/10-1 Hz
F=1/(10-1 *103) KHz
F = 10-2 KHz
Question 66
Match List I with List II: LR: Regular languages, LCF: Context free language LREC: recursive language, LRE: Recursively enumerable language. List I                                                                  List II (A) Recursively Enumerable language                     (I) L'REC U LRE (B) Recursive language                                              (II) L'CF U LREC (C) Context Free language                                        (III) L*R ∩ LCF Choose the correct answer from the options given below:
A
A-II, B-III, C-I
B
A-III, B-I, C-II
C
A-I, B-II, C-III
D
A-II, B-I, C-III
       Theory-of-Computation       Closure-Property
Question 66 Explanation: 
L'REC U LRE : Recursive languages are closed under complement operation. L'REC is LREC . Since Recursive languages are subsets of Recursively enumerable languages hence LREC is LRE. . And Recursively Enumerable languages are closed under Union Operation. Hence L'REC U LRE Is a recursively enumerable language.
L'CF U LREC : Context Free Languages are not closed under complement operation but as we know CFL are a subset of Recursive language and Recursive languages are closed under complement operation. So we can say that L'CF is a Recursive language. And we know recursive languages are closed under union operation hence L'CF U LREC is a recursive language.
L*R ∩ LCF : Regular languages are closed under Kleene closure operation. Hence L*R is a regular language. Now let’s take an example where L1 = (a+b)* be an regular language and L2 = {anbn |n>=0} be a CFL. Now L1∩L2 will always be a context free language i.e. in this case it will be {anbn |n>=0}. Hence L*R ∩ LCF will be a CFL.
Question 67
Consider a relational schema S=(U,V,W,X,Y,Z) on which the following functional dependence hold: { U → V, VW → X, Y → W, X → U} Which are the candidate keys among following options?
A
UY, VY
B
UY, VY, XY
C
UYZ, VYZ, VWZ
D
UYZ, VYZ, XYZ
       Database-Management-System       Candidate-key
Question 67 Explanation: 
YZ is not present in the RHS of any FD, so the key must include YZ as its attributes.
Now lets see whether YZ is the candidate key or not?
YZ ={ Y, Z, W}
So YZ is not the candidate key.
Now let's check the candidate key of length 3 .
YZX ={U, V, W ,X, Y, Z}
YZU ={U, V, W ,X, Y, Z}
YZV ={U, V, W ,X, Y, Z}
Question 68
A complete n-ary tree is a tree in which nodes have children or no children. Let I be the number of internal nodes and L be the number of leaves in a complete n-ary tree. If L=41, and I=10, what is the value of n?
A
3
B
4
C
5
D
6
       Data-Structures       Trees
Question 68 Explanation: 
L =(n-1)I+1 where L= no. of leaf nodes, I= Internal Node
41 = (n-1)10+1
41 = 10n - 10+1
10n= 41-1+10
N = 5
Question 69
In HTML, < map > tag is used for
A
defining a path between two nodes in an image
B
defining clickable region in an image
C
highlighting an area in an image
D
defining the site-map of a web-site
       Web-Technologies       HTML
Question 69 Explanation: 
The HTML < map > element is used with < area > elements to define an image map (a clickable link area).
Question 70
Consider a code with only four valid code words: 0000000000, 0000011111, 1111100000, and 1111111111. This code has distance 5. If the code word arrived is 0000000111 then the original code word must be ____________.
A
0000011111
B
0000000000
C
1111100000
D
1111111111
       Digital-Logic-Design       Hamming-Code
Question 70 Explanation: 
For correcting t-bit error hamming distance should be 2t+1.
So, 2t + 1 = 5
t = 2
It means the hamming distance between the codeword 0000000111 and give option should be of 2-bits. Only Option 1 satisfies this condition so option 1 is the right answer.
Question 71
Concerning phong shading and gouraud shading in a 3D scene, which of the following statements are true? (A) Gouraud shading requires more computation than phong shading (B) Gouraud shading linearly interpolates the color of an interior pixel from the color at the vertices. (C) Phong shading interpolates over the normal vectors specified at the vertices. Choose the correct answer from the options given below:
A
(A) and (B) only
B
(A) and (C) only
C
(B) and (C) only
D
(A), (B) and (C)
       Computer-Graphics       3D
Question 72
How many ways are there to pack six copies of the same book into four identical boxes, where a box can contain as many as six books?
A
4
B
6
C
7
D
9
       Engineering-Mathematics       Combinatorics
Question 73
Consider L=L1 ∩ L2 where L1 = {0m 1m 20n 1n | m,n ≥0} L2 = {0m 1n 2k | m,n,k ≥0} Then, the language L is
A
recursively enumerable but not context free
B
regular
C
Context free but not regular
D
Not recursive
       Theory-of-Computation       Languages-and-Grammars
Question 73 Explanation: 
L1 will first contain 0’s followed by an equal number of 1’s. After that there will be a single 2 which will again be followed by 0’s and equal number of 1’s. I.e. L1 ={ 2, 012, 00112, 20011, 01201, 0011201, 0120011, 001120011,........}
L2 = { epsilon, 0,1,2,01,12, 012, 00112, 20011, 01201, 0011201, 0120011, 001120011,........}
L=L1 ∩ L2 = { 2, 012. 00112, 0001112,.......}
L1 ∩ L2 = { 0m1m2 | m>=0}, which is a context free language but not regular language. Hence option 3 is correct.
Question 74
n the context of 3D Computer graphics, which of the following statements is/are correct? A) Under perspective projection, each set of parallel lines in the object do not stay parallel in the image (except those that are parallel to the view plane to start with). B) Applying a perspective transformation in the graphics pipeline to a vertex involves dividing by its ‘z’ coordinate. C) Perspective transformation is a linear transformation. Choose the correct answer from the options given below:
A
(A) and (B) only
B
(A) and (C) only
C
(B) and (C) only
D
(A), (B) and (C)
       Computer-Graphics       3D
Question 75
Consider the following properties: A. Reflexive B. Antisymmetric C. Symmetric Let A = {a, b, c, d, e, f, g} and R = {(a,a), (b,b), (c,d), (c,g), (d,g), (e,e), (f,f), (g,g)} be a relation on A. Which of the following property (properties) is (are) satisfied by the relation R?
A
Only A
B
Only C
C
Both A and B
D
B and not A
       Engineering-Mathematics       Set-Theory
Question 75 Explanation: 
A binary relation R over a set X is reflexive if it relates every element of X to itself. In the given question (c,c), (d,d) are not given so it is not reflexive.
Antisymmetric: A relation is antisymmetric if there is no pair of distinct elements of X each of which is related by R to the other.The given relation R is antisymmetric because for (c,d), (d,c) is not present in R. Similarly for (c,g) and (d,g).
A symmetric relation is a type of binary relation. An example is the relation "is equal to", because if a = b is true then b = a is also true. Here since (c,d) is a pair in a given relation R for which (d,c) is not present in it. So it violate Symmetric property of the relation. Hence it is not symmetric
Question 76
In a binary max heap containing n numbers, the smallest element can be found in_____ time.
A
O(n)
B
O(log2 n)
C
O(1)
D
O(log2 log2 n)
       Data-Structures       Heap-Tree
Question 76 Explanation: 
In a MAX heap the smallest values of the heap will always be present on the last level of heap and time complexity of reaching the last level of heap is O(n).
We have to search all the elements to reach the smallest element and heap using linear search.
To traverse all elements using linear search will take O(n) time.
Question 77
Match List I with List II List I                                                                 List II A) Branch-and-bound                          (I) Keeps track of all partial paths which can be can be a candidate for further exploration. B) Steepest-ascent hill climbing       (II) Detects difference between current state and goal state. C) Constraint satisfaction                 (III) Discovers problem state(s) that satisfy a set of constraints. D) Means-end-analysis                      (IV) Considers all moves from current state and selects the best move. Choose the correct answer from the options given below:
A
A-I, B-IV, C-III, D-II
B
A-I, B-II, C-III, D-IV
C
A-II, B-I, C-III, D-IV
D
A-II, B-IV, C-III, D-I
       Artificial-intelligence       Hill-Climbing-Algorithm
Question 77 Explanation: 
Branch-and-bound→ Keep track of all partial paths which can be a candidate for further exploration.
Steepest-ascent hill climbing → Considers all moves from current state and selects the best move.
Constraint satisfaction → Discovers problem state(s) that satisfy a set of constraints.
Means-end-analysis → Detects difference between current state and goal state.
Question 78
The number of positive integers not exceeding 100 that are either odd or the square of an integer is _______.
A
63
B
59
C
55
D
50
       Engineering-Mathematics       Number-Systems
Question 78 Explanation: 
Use the principle of inclusion-exclusion to solve the given problem.
|A U B| = |A|+|B|-|A∩B|
Input: 100 integers not exceeding 100
To find: odd or square of an integer.
Step-1: To find odd numbers use 100/2 = 50
Step-2: To find the square of the number not exceeding 100 is 10.
As per the given bound number we can get 1^2, 2^2, 3^2, 4^2,...,10^2.
Step-3: Apply principle of inclusion-exclusion formula
|A U B| = |A|+|B|-|A ∩ B|
= 50+10-5
= 55
Question 79
Post office protocol (POP) is a message access protocol which is used to extract messages for clients. In this regard, which of the following are true? A) POP has two modes, Delete mode and keep B) In Delete mode, mail is deleted from mailbox after each retrieval C) In Delete mode, mail is deleted from the mailbox before each retrieval. D) In keep mode, mail is deleted before retrieval. E) In keep mode, mail remains in the mailbox after retrieval. Choose the correct answer from the options given below:
A
(A) and (B) only
B
(A), (D) and (E) only
C
(A), (B), (C) and (D) only
D
(A), (B) and (E) only
       Computer-Networks       E-mail
Question 80
Given below are two statements: Statement I: Quality control involves the series of inspections, reviews and tests used throughout the software process, to ensure each work product meets the requirements placed upon it. Statement II: Quality assurance consists of auditing and reporting functions of management. In the light of the above statements, choose the correct answer from the option given below
A
Both Statement I and Statement II are true
B
Both Statement I and Statement II are false
C
Statement I is correct but Statement II is false
D
Statement I is incorrect but Statement II is true
       Software-Engineering       Software-quality
Question 80 Explanation: 
Quality control: Quality control involves the series of inspections, reviews, and tests used throughout the software process to ensure each work product meets the requirements placed upon it. Quality control includes a feedback loop to the process that created the work product. The combination of measurement and feedback allows us to tune the process when the work products created fail to meet their specifications.This approach views quality control as part of the manufacturing process.Quality control activities may be fully automated, entirely manual, or a combination of automated tools and human interaction. A key concept of quality control is that all work products have defined, measurable specifications to which we may compare the output of each process. The feedback loop is essential to minimize the defects produced.
Quality Assurance: Quality assurance consists of the auditing and reporting functions of management. The goal of quality assurance is to provide management with the data necessary to be informed about product quality, thereby gaining insight and confidence that product quality is meeting its goals. Of course, if the data provided through quality assurance identify problems, it is management’s responsibility to address the problems and apply the necessary resources to resolve quality issues.
Question 81
Which of the following statements regarding XML is/are TRUE? (A) XML is a set of tags designed to tell browsers how to display text and images in a web page. (B) XML defines a syntax for representing data, but the meaning of data varies from application to application. (C) < Letter >, < LETTER > and < letter > are three different tags in XML Choose the correct answer from the options given below:
A
(A) and (B) only
B
(A) and (C) only
C
(B) and (C) only
D
(A), (B) and (C)
       Web-Technologies       XML
Question 81 Explanation: 
-XML was designed to carry data - with focus on what data is
-HTML was designed to display data - with focus on how data looks
→ FALSE: HTML is a set of tags designed to tell browsers how to display text and images in a web page.
→ TRUE: XML defines a syntax for representing data, but the meaning of data varies from application to application.
→ TRUE: XML is case sensitive.
Question 82
Which of the following is/are behavioral testing technique(s)? (A) Equivalence Partitioning (B) Graph-Based Testing Method (C) Boundary Value Analysis (D) Data flow Testing (E) Loop Testing Choose the correct answer from the options given below:
A
(B) and (D) only
B
(A), (B) and (C) only
C
(D) and (E) only
D
(A), (C) and (E) only
       Software-Engineering       Software-testing
Question 82 Explanation: 
Black-box testing, also called behavioral testing, focuses on the functional requirements of the software. That is, black-box testing enables the software engineer to derive sets of input conditions that will fully exercise all functional requirements for a program. The following are behavioral testing techniques
(1) Graph-Based Testing Methods
(2) Equivalence Partitioning
(3) Boundary Value Analysis
(4) Comparison testing
(5) Orthogonal Array Testing
Question 83
Which of the following is NOT true in problem solving in artificial intelligence?
A
Implements heuristic search techniques
B
Solution steps are not explicit
C
Knowledge is imprecise
D
it works on or implements repetition mechanism
       Artificial-intelligence       Approaches-to-AI
Question 84
Given below are two statements: Statement I: The problem "Is L1 ∧ L2=Ø?" is undecidable for context sensitive languages L1 and L2. Statement II: The problem "Is W ∈ L?"is decidable for context sensitive language L, (where W is a string). In the light of the above statements, choose the correct answer from the options given below
A
Both Statement I and Statement II are true
B
Both Statement I and Statement II are false
C
Statement I is correct but Statement II is false
D
Statement I is incorrect but Statement II is true
       Theory-of-Computation       Decidability-and-Undecidability
Question 85
Consider a disk system having 60 cylinders. Disk requests are received by a disk drive for cylinders 10, 22, 20, 2, 40, 6 and 38, in that order. Assuming the disk head is currently at cylinder 20, what is the time taken to satisfy all the requests if it takes 2 milliseconds to move from one cylinder to adjacent one and Shortest Seek Time First (SSTF) algorithm is used?
A
240 milliseconds
B
96 milliseconds
C
120 milliseconds
D
112 milliseconds
       Operating-Systems       Disk-Scheduling
Question 85 Explanation: 
Question 86
Which of the following are applications of symbol table? A) Storage allocation B) Checking type compatibility C) Suppressing duplicate error messages Choose the correct answer from the options given below:
A
(A) and (B) only
B
(A) and (C) only
C
(B) and (C) only
D
(A), (B) and (C) only
       Compiler-Design       Symbol-Table
Question 86 Explanation: 
All statements are application of symbol table
Symbol table can be used for
1. Checking type compatibility
2. Suppressing duplication of error message
3. Storage allocation
Question 87
Let G1 and G2 be arbitrary context free languages and R an arbitrary regular language. Consider the following problems: A) Is L(G1)=L(G2)? B) Is L(G2)≤L(G1)? C) Is L(G1)=R? Which of the problems are undecidable? Choose the correct answer from the options given below:
A
(A) only
B
(B) only
C
(A) and (B) only
D
(A), (B) and (C)
       Theory-of-Computation       Decidability-and-Undecidability
Question 87 Explanation: 
Question 88
If algorithm A and another algorithm B take log2(n) and √n microseconds, respectively, to solve a problem, then the largest size n of a problem these algorithms can solve, respectively, in one second are______ and ______.
A
2106 and 106
B
2106 and 1012
C
2106 and 6 x 106
D
2106 and 6 x 1012
       Algorithms       Time-Complexity
Question 88 Explanation: 
A microsecond is 10−6 seconds. Hence, one second = 106 microseconds, one hour = 3600000000 = 3.6 · 109 microseconds, one month (assume a month has 30 days) = 2592000000000 = 2.592 · 1012 microseconds, and one century = 3110400000000000 = 3.1104 · 1015 microseconds. f(n) = log n In this case, we need to determine the largest n such that log n ≤ 1000000. To solve this inequality, we need to rewrite the inequality as 2logn ≤ 2 1000000 or n ≤ 2 1000000. 210 ≈ 103 , thus we have that 21000000 = 210·100000 = (210) 100000 ≈ (103 ) 100000 = 10300000
Question 89
The running time of an algorithm is O(g(n)) if and only if
A
its worst-case running time is O(g(n)) and its best-case running time is (g(n))(O=big O)
B
its worst-case running time is Ω(g(n)) and its best-case running time is O(g(n))(O=big O)
C
O(g(n))=Ω(g(n))(O=big O)
D
o(g(n)) ∩ ω(g(n))is non-empty set, (o=small o)
       Algorithms       Time-Complexity
Question 89 Explanation: 
BigOh(O) denotes upper bound or worst case
BigOmega(Ω) denotes lower bound or best case
BigTheta(θ) denotes Average bound or average case
Question 90
Which of the following is not an intermediate code form?
A
Syntax trees
B
Three address codes
C
Quadruples
D
Post fix Notation
E
None of the above
       Compiler-Design       Phases-of-Compilers
Question 91
Comprehension: Question 91-95 concerns a disk with a sector size of 512 bytes, 2000 tracks per surface. 50 sectors per track, five double-sided platters, and average seek time of 10 milliseconds. Q91: If one track of data can be transferred per revolution, then what is the data transfer rate?
A
2,850 KBytes/second
B
4,500 KBytes/second
C
5,700 KBytes/second
D
2,250 KBytes/second
       Computer-Organization       Secondary-Memory
Question 91 Explanation: 
It is given that the disk platters rotate at 5400 RPM.
In 60s - 5400 rotations Time for one rotation = 60s/5400 = (1/90) seconds In (1/90)seconds one track size can be transferred. Each track is of size 25KB. In 1/90 seconds 25KB can be transferred. In 1 seconds the amount of data that can be transferred = 25KB*90 = 2250KB So the data transfer rate = 2250 KB/s
Question 92
Comprehension: Question 91-95 concerns a disk with a sector size of 512 bytes, 2000 tracks per surface. 50 sectors per track, five double-sided platters, and average seek time of 10 milliseconds.Q92: Given below are two statements: Statement I: The disk has a total number of 2000 cylinders. Statement II: 51200 bytes is not a valid block size for the disk. In the light of the above statements, choose the correct answer from the options given below:
A
Both Statement I and Statement II are true
B
Both Statement I and Statement II are false
C
Statement I is correct but Statement II is false
D
Statement I is incorrect but Statement II is true
       Computer-Organization       Secondary-Memory
Question 92 Explanation: 
Statement I is true because in a disk each track will be part of one cylinder. Since there are 2000 tracks there will be 2000 cylinders.
Statement II is also true , because each track has a size of 25KB. A block size can't be bigger than the track size.
Question 93
Comprehension: Question 91-95 concerns a disk with a sector size of 512 bytes, 2000 tracks per surface. 50 sectors per track, five double-sided platters, and average seek time of 10 milliseconds.Q93: If T is the capacity of a track in bytes, and S is the capacity of each surface in bytes, then (T,S) = ______.
A
(50 K, 50000 K)
B
(50 K, 50000 K)
C
(25 K, 50000 K)
D
(40 K, 36000 K)
       Computer-Organization       Secondary-Memory
Question 93 Explanation: 
T= size of a track in bytes = number of sectors per track * size of each sector
= 50*512 bytes = 25K bytes
S = size of each surface in bytes = Number of tracks per surface * number of sectors per track * size of each sector = 2000*50*512 bytes = 50,000 K bytes
Question 94
Comprehension: Question 91-95 concerns a disk with a sector size of 512 bytes, 2000 tracks per surface. 50 sectors per track, five double-sided platters, and average seek time of 10 milliseconds.Q94: What is the capacity of the disk, in bytes?
A
25,000 K
B
500,000 K
C
250,000 K
D
50,000 K
       Computer-Organization       Secondary-Memory
Question 94 Explanation: 
There are 5 double-sided platters. So total 10 surfaces.
There are 2000 tracks per surface and each track has 50 sectors and each sector is 512 bytes in size.
Total disk capacity = Number of surfaces * Number of tracks per surface * number of sectors per track * size of each sector = 10*2000*50*512 bytes = 500,000 K bytes
Question 95
Comprehension: Question 91-95 concerns a disk with a sector size of 512 bytes, 2000 tracks per surface. 50 sectors per track, five double-sided platters, and average seek time of 10 milliseconds.Q95: If the disk platters rotate at 5400 rpm (revolutions per minute), then approximately what is the maximum rotational delay?
A
0.011 seconds
B
0.11 seconds
C
0.0011 seconds
D
1.1 seconds
       Computer-Organization       Secondary-Memory
Question 95 Explanation: 
It is given that the disk platters rotate at 5400 RPM.
In 60s - 5400 rotations
Time for one rotation = 60s/5400 = (1/90) seconds = 0.011 seconds
The maximum rotational delay = 0.011 seconds.
Question 96
Comprehension: Consider the following table structures related to a university for Q96 to Q100:- EMPLOYEE          NAME          VARCHAR (30)         NOT NULL,          EID               VARCHAR (10)        NOT NULL,          DEPTNO      INT (5)                      NOT NULL,          HODEID       VARCHAR (10),            SALARY       INT (10),  PRIMARY KEY (EID), FOREIGN KEY (HODEID) REFERENCES EMPLOYEE (EID), FOREIGN KEY (DEPTNO) REFERENCES DEPARTMENT (DID); DEPARTMENT        DID                INT (5)                    NOT NULL,        DNAME         VARCHAR (30)       NOT NULL,        HODID           VARCHAR (10)      NOT NULL,        HODNAME    VARCHAR (30), PRIMARY KEY (DID), UNIQUE (DANAME), FOREIGN KEY (HODID) REFERENCES EMPLOYEE (EID); PROJECT WORK:         EMPID                  VARCHAR (30)          NOT NULL,         PROJNO              INT (5)                        NOT NULL,         PROJECTLOC     VARCHAR (30)          NOT NULL, PRIMARY KEY (EMPID, PROJNO), FOREIGN KEY (EMPID) REFERENCES EMPLOYEE (EID), Q96: Given below are two statements to find the sum of salaries of all employees of the English department as well as the maximum, minimum and average salary in English department. STATEMENT I: SELECT SUM (SALARY), MAX (SALARY), MIN (SALARY)                          AVG (SALARY) FROM EMPLOYEE DEPARTMENT                          WHERE DEPTNO=DID                          AND DNAME=’ENGLISH’; STATEMENT II: SELECT SUM (SALARY), MAX (SALARY), MIN (SALARY)                           AVG (SALARY) FROM EMPLOYEE, DEPARTMENT                           WHERE DNAME=’ENGLISH’;   In the light of the above statements, choose the correct answer from the options given below
A
Both Statement I and Statement II are true
B
Both Statement I and Statement II are false
C
Statement I is correct but Statement II is false
D
Statement I is incorrect but Statement II is true
       Database-Management-System       SQL
Question 96 Explanation: 
Output for statement - I:
mysql> select sum(salary),max(salary),min(salary),avg(salary)
-> from employee,department
-> where deptno=did and dname='english';

Output for statement-II:
mysql> select sum(salary),max(salary),min(salary),avg(salary)
-> from employee,department
-> where dname='english';

Question 97
Comprehension: Consider the following table structures related to a university for Q96 to Q100:- EMPLOYEE          NAME          VARCHAR (30)         NOT NULL,          EID               VARCHAR (10)        NOT NULL,          DEPTNO      INT (5)                      NOT NULL,          HODEID       VARCHAR (10),            SALARY       INT (10),  PRIMARY KEY (EID), FOREIGN KEY (HODEID) REFERENCES EMPLOYEE (EID), FOREIGN KEY (DEPTNO) REFERENCES DEPARTMENT (DID); DEPARTMENT        DID                INT (5)                    NOT NULL,        DNAME         VARCHAR (30)       NOT NULL,        HODID           VARCHAR (10)      NOT NULL,        HODNAME    VARCHAR (30), PRIMARY KEY (DID), UNIQUE (DANAME), FOREIGN KEY (HODID) REFERENCES EMPLOYEE (EID); PROJECT WORK:         EMPID                  VARCHAR (30)          NOT NULL,         PROJNO              INT (5)                        NOT NULL,         PROJECTLOC     VARCHAR (30)          NOT NULL, PRIMARY KEY (EMPID, PROJNO), FOREIGN KEY (EMPID) REFERENCES EMPLOYEE (EID), 97: On the basis of above given table structures, retrieve the distinct employee ID (EMPID) of all employees of university who are working on project No. 20, 30 and 40.
A
SELECT EMPID
FROM PROJECTWORK
WHERE PROJNO=(20,30,40);
B
SELECT EMPID
FROM PROJECTWORK
WHERE PROJNO IN (20,30,40);
C
SELECT DISTINCT EMPID
FROM PROJECTWORK
WHERE PROJNO IN (20,30,40);
D
SELECT DISTINCT EMPID
FROM PROJECTWORK
WHERE PROJNO=20,30,40;
       Database-Management-System       SQL
Question 97 Explanation: 
Option (1): Syntactical error.
mysql> select empid from projectwork where projno=(20,30,40);
ERROR : Operand should contain 1 column(s)
Option (2): (Duplicate empid's present)
mysql> select empid from projectwork where projno in(20,30,40);
Option (3): (Unique empid's present)
mysql> select distinct empid from projectwork where projno in(20,30,40);

Option (4): Syntactical error
mysql> select distinct empid from projectwork where projno=20,30,40;
SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',30,40' at line 1
Question 98
Comprehension: Consider the following table structures related to a university for Q96 to Q100:- EMPLOYEE          NAME          VARCHAR (30)         NOT NULL,          EID               VARCHAR (10)        NOT NULL,          DEPTNO      INT (5)                      NOT NULL,          HODEID       VARCHAR (10),            SALARY       INT (10),  PRIMARY KEY (EID), FOREIGN KEY (HODEID) REFERENCES EMPLOYEE (EID), FOREIGN KEY (DEPTNO) REFERENCES DEPARTMENT (DID); DEPARTMENT        DID                INT (5)                    NOT NULL,        DNAME         VARCHAR (30)       NOT NULL,        HODID           VARCHAR (10)      NOT NULL,        HODNAME    VARCHAR (30), PRIMARY KEY (DID), UNIQUE (DANAME), FOREIGN KEY (HODID) REFERENCES EMPLOYEE (EID); PROJECT WORK:         EMPID                  VARCHAR (30)          NOT NULL,         PROJNO              INT (5)                        NOT NULL,         PROJECTLOC     VARCHAR (30)          NOT NULL, PRIMARY KEY (EMPID, PROJNO), FOREIGN KEY (EMPID) REFERENCES EMPLOYEE (EID), Q98: Refer table, structures given above. University decided to give all employees in the ‘SCIENCE’ department a 20% rise in salary. Which of the following query/ queries will compute the above results? A) UPDATE EMPLOYEE SET SALARY = SALARY*1.20 WHERE DEPT NO. IN (SELECT DID FROM DEPARTMENT WHERE DNAME=’SCIENCE’); B) UPDATE TABLE EMPLOYEE SET SALARY = SALARY*1.20 WHERE DNAME=’SCIENCE’; C) ALTER TABLE EMPLOYEE SET SALARY=SALARY*1.20 WHERE DEPTNO. IN (SELECT DNAME FROM DEPARTMENT WHERE DNAME =’SCIENCE’) Choose the correct answer from the options given below”
A
(A) and (B) only
B
(A) only
C
(B) and (C) only
D
(C) only
       Database-Management-System       SQL
Question 98 Explanation: 
(A): mysql> update employee set salary=salary*1.20
-> where deptno in(select did from department where dname='science');
Query OK, 3 rows affected
mysql> select * from employee;

(B): (The dname column is not there in employee table)
mysql> update employee set salary=salary*1.20
-> where dname='science';
ERROR : Unknown column 'dname' in 'where clause'
(C): Alter command is not used for updating values.
Question 99
Comprehension: Consider the following table structures related to a university for Q96 to Q100:- EMPLOYEE          NAME          VARCHAR (30)         NOT NULL,          EID               VARCHAR (10)        NOT NULL,          DEPTNO      INT (5)                      NOT NULL,          HODEID       VARCHAR (10),            SALARY       INT (10),  PRIMARY KEY (EID), FOREIGN KEY (HODEID) REFERENCES EMPLOYEE (EID), FOREIGN KEY (DEPTNO) REFERENCES DEPARTMENT (DID); DEPARTMENT        DID                INT (5)                    NOT NULL,        DNAME         VARCHAR (30)       NOT NULL,        HODID           VARCHAR (10)      NOT NULL,        HODNAME    VARCHAR (30), PRIMARY KEY (DID), UNIQUE (DANAME), FOREIGN KEY (HODID) REFERENCES EMPLOYEE (EID); PROJECT WORK:         EMPID                  VARCHAR (30)          NOT NULL,         PROJNO              INT (5)                        NOT NULL,         PROJECTLOC     VARCHAR (30)          NOT NULL, PRIMARY KEY (EMPID, PROJNO), FOREIGN KEY (EMPID) REFERENCES EMPLOYEE (EID), SubQuestion No: 99 Q99: Which of the following query/ queries return the employee ID and name of employees whose salary is greater than the salary of all employees in department number 20 of university. Order result by employee ID (refer table structures given above). A) SELECT EID, NAME FROM EMPLOYEE WHERE SALARY>(SELECT SALARY FROM EMPLOYEE WHERE DEPTNO=20) ORDER BY EID; B) SELECT EID, NAME FROM EMPLOYEE WHERE SALARY>(SELECT SALARY FROM EMPLOYEE WHERE DEPTNO=20); C) SELECT EID, NAME FROM EMPLOYEE WHERE SALARY>ALL(SELECT SALARY FROM EMPLOYEE WHERE DEPTNO=20) ORDER BY EID Choose the correct answer from the options given below:
A
(A) and (B) only
B
(A) and (C) only
C
(B) only
D
(C) only
       Database-Management-System       SQL
Question 99 Explanation: 

(A): mysql> where salary>(select salary from employee where deptno=2) order by eid;
ERROR : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where salary>(select salary from employee where deptno=2) order by eid' at line 1
(B): mysql> select eid,name from employee
-> where salary>(select salary from employee where deptno=2);
ERROR : Subquery returns more than 1 row
(C): mysql> select eid,name from employee
-> where salary>all(select salary from employee where deptno=2) order by eid;
Question 100
Comprehension: Consider the following table structures related to a university for Q96 to Q100:- EMPLOYEE NAME VARCHAR (30) NOT NULL, EID VARCHAR (10) NOT NULL, DEPTNO INT (5) NOT NULL, HODEID VARCHAR (10), SALARY INT (10), PRIMARY KEY (EID), FOREIGN KEY (HODEID) REFERENCES EMPLOYEE (EID), FOREIGN KEY (DEPTNO) REFERENCES DEPARTMENT (DID); DEPARTMENT DID INT (5) NOT NULL, DNAME VARCHAR (30) NOT NULL, HODID VARCHAR (10) NOT NULL, HODNAME VARCHAR (30), PRIMARY KEY (DID), UNIQUE (DANAME), FOREIGN KEY (HODID) REFERENCES EMPLOYEE (EID); PROJECT WORK: EMPID VARCHAR (30) NOT NULL, PROJNO INT (5) NOT NULL, PROJECTLOC VARCHAR (30) NOT NULL, PRIMARY KEY (EMPID, PROJNO), FOREIGN KEY (EMPID) REFERENCES EMPLOYEE (EID), SubQuestion No: 100 Q100: In reference to the above given table structures, which of the following query/queries will drop the ‘SALARY’ column from ‘EMPLOYEE’ table? A) ALTER TABLE EMPLOYEE DROP SALARY CASCADE; B) ALTER TABLE EMPLOYEE DROP SALARY RESTRICT; C) ALTER TABLE EMPLOYEE DROP SALARY; Choose the correct answer from the options given below:
A
(A) and (B) only
B
(A) and (C) only
C
(B) and (C) only
D
(A) only
       Database-Management-System       SQL
Question 100 Explanation: 

Restrict and Cascade
When a constraint or a column is dropped, specify either the RESTRICT or CASCADE option:
RESTRICT
Does not drop the constraint or column if one or more objects exist that depend on it. For example:
•A view with reference to the column in the base table
•A check constraint on the column being dropped
•A secondary index defined with this column
CASCADE
Deletes all objects that depend on the dropped constraint or column.
For example, if a unique constraint upon which a referential constraint is dependent is dropped, the dependent constraints are dropped. If a column is dropped, all integrity constraints, grants, views, and indexes that depend on the column are dropped.
The user is not provided with information describing the dependent objects that are dropped.

(A): mysql> alter table employee drop salary cascade;
Query OK, 0 rows affected

(B): mysql> alter table employee drop salary restrict;
Query OK, 0 rows affected
(C): Syntactical error. The 'table' keyword should be used along with alter command.
There are 100 questions to complete.