# Answers by VS

1
What is one advantage of setting up a $DMZ$ (Demilitarized Zone) with two firewalls? You can control where traffic goes in the three networks You can do statefull packet filtering You can do load balancing Improve network performance
2
In multi-programmed systems, it is advantageous if some programs such as editors anf compilers can be shared by several users. Which of the following must be true of multi-programmed systems in order that a single copy of a program can be shared by several users? The program is a macro The program is recursive The program is reentrant I only II only III only I, II and III
3
in a file which contains $1$ million records and the order of the tree is $100$, then what is the maximum number of nodes to be accessed if $B$+ tree index is used? $5$ $4$ $3$ $10$
4
In cryptography, the following uses transposition ciphers and the keyword is LAYER. Encrypt the following message. (Spaces are omitted during encrypton) WELCOME TO NETWORK SECURITY! WMEKREETSILTWETCOOCYONRU! EETSICOOCYWMEKRONRU!LTWET LTWETONRU!WMEKRCOOCYEETSI ONRU!COOCYLTWETEETSIWMEKR
5
A computer uses ternary system instead of the traditional systen, An $n$ bit string in the binary system will occupy $3+n$ ternary digits $2n/3$ ternary digits $n$\log_{2}3$ternary digits$n$\log_{3}2$ ternary digits
1 vote
6
Which of the following comment about peep-hole optimization is true? It is applied to small part of the code and applied repeatedly It can be used to optimize intermediate code It can be applied to a portion of the code that is not contiguous It is applied in symbol table to optimize the memory requirements.
7
The $FSM$ (Finite State Machine) machine pictured in the figure above Complements a given bit pattern Finds $2's$ complement of a given bit pattern Increments a given bit pattern by $1$ Changes the sign bit
8
Choose the correct statement - $A=\{a^nb^n \mid n= 1, 2, 3, \ldots\}$ is a regular language The set $B$, consisting of all strings made up of only $a's$ and $b's$ having equal number of $a's$ and $bs$ defines a regular language $L(A^*B)\cap B$ gives the set $A$ None of the above
9
The domain of the function log (log sin(x)) is: $0<x<$\pi2n$\pi$<$x$<$(2n+1)$\pi$, for$n$in$N$Empty set None of the above 3 votes 10 The difference between a named pipe and a regular file in Unix is that Unlike a regular file, named pipe is a special file The data in a pipe is transient, unlike the content of a regular file Pipes forbid random accessing, while regular files do allow this. All of the above 13 votes 11 Consider the following program { int x=1; printf("%d",(*char(char*)&x)); } Assuming required header files are included and if the machine in which this program is executed is little endian, then the output will be 0 99999999 1 unpredictable 1 vote 12 Please write grammar for it and explain with example.$L=\{w \: : n_a(w) > n_b(w) \}$28 votes 13 MY SOLUTION : Fix the root then next level 2 elements ( 2! possibilities) next level 4 elements( 4! possibilities) last level 2 elements ( 2! possibilities) total possibility = 2! * 4! * 2! = 2 * 24 * 2 = 96 what went wrong ? just in case if the question in image is ... 3,2,1,7,9 such that if node of above graph is filled with these elements it satisfies max heap property a)96 b)896 c)2688 d) none 3 votes 14 A byte addressable computer has a small data cache capable of holding 16 32-bit words. Each cache block consist of four 32 bits words. For the following sequence of main memory addresses (in hexadecimal). The conflict miss if 2-way set associative LRU cache is used is ________. 100, 108, 114, 1C7, 128, 1B5, 100, 108, 1C7 2 votes 15 Consider the following code segment: c=b+a e=c-a f=c*e h=c+a i=h+f The minimum number of$\color{blue} {total}$and$\color{blue} {temporary }$variable required to convert the above code segment to static single assignment form are ________ 10 votes 16 Consider an initially empty hash table of length 10. Following set of keys are inserted using open addressing with hash function h(k) = k mod 10 and linear probing. 0 1 91 2 2 3 13 4 24 5 12 6 62 7 77 8 82 9 The number of different insertion sequence of the key values using the given hash function and linear probing will result in the hash table shown in above __________. 4 votes 17 A system has 10 identical resources and N processes competing for them. Each process can request atmost 3 resources but by grouping of first 3 processes needs only 6 resources. Then, the maximum value of ‘N’ is _______. 6 votes 18 L={$a^m$b^n$ | m <= n <= 3m }
19
Consider a linked list of length n is implemented using a circular array P[0, n - 1], two variables first and last are used to point the first and last element of the list present in array respectively i.e., first = P and last = (P + x) mod n, where x is the size of linked list ... represent the time complexity of above two operations respectively? O(n), O(n) O(n), O(1) O(1), O(1) O(1), O(n)
20
In general merge sort is not considered in-place sorting technique. Because an auxiliary array is used. If we will try to do it in-place in array data structure then our merge procedure will take O($n^2$ ... using a doubly linked list in place of Array (for storing and merging data) ? Please share your valuable opinion. It will be great help.
21
22
In bootp protocol client puts all 0 in source IP and broadcast the packet.Then relay agent encapsulate that in a unicast packet and send to boot p server. How does boot p server know the Mac address of the client to which it is assigning the address ?
Following is a state table for time finite state machine. ... for the equivalent states. For example if states $X$ and $Y$ are equivalent then use $XY$ as the name for the equivalent state in the minimal machine).