Gate Mock Test- 2: CS/IT

65 Questions MCQ Test GATE Computer Science Engineering(CSE) 2023 Mock Test Series | Gate Mock Test- 2: CS/IT

Attempt Gate Mock Test- 2: CS/IT | 65 questions in 180 minutes | Mock test for GATE preparation | Free important questions MCQ to study GATE Computer Science Engineering(CSE) 2023 Mock Test Series for GATE Exam | Download free PDF with solutions

A vendor sells his articles at a certain profit percentage. If he sells his articles at ¼th of his actual selling price then he incurs a loss of 60%. What is his actual profit percentage?


Let the cost price = 100 Rs.

From the options:

If profit % = 60%

Then SP = 160 Rs.

New SP = 160/4 = 40 Rs.


Percentage loss= (100-40)/100 = 60%

Hence Verified


Let the selling price is 100

New selling price 100/4 = 25

He suffers a loss of 60%.

CP*0.4 = 25

CP = 25/0.4 = 62.5

Actual Profit = 100 - 62.5 = 37.5

profit% = 37.5/62.5 *100 = 60%


Find wrong number in series: 23, 29, 31, 33, 41, 43, 47


the given series is prime numbers from 23


Criteria for selecting candidate for internship programme

The candidate:

(1) can preferably start the internship between 18th Oct'17 and 17th Nov'17

(2) are preferably available for duration of 6 months

(3) have computer skills and interest in designing

(4) have already graduated or are currently in any year of study

(5) knows to deal with customers

Nick is a high school student and wants to do an internship as his summer project. He is a very vibrant boy and goes well with people. Is he the right candidate for the internship?

Solution: He does is looking for summer internships and November is not summer time. Hence, option B is the correct option.

Direction: In the given question, one statement with a blank along with four words is given. Two of the given words can fit into the given blank. Five options with various combinations of these words are given. Choose the combination of the words that best fits into the blank.

Comedian Vasu Primlani takes a hilarious ______ at the new trend of renaming Indian cities.

a) Jabs

b) Jokes

c) Satires

d) Gags

Solution: The meaning of the words as follows:

a. Jab as a noun refers to a quick, sharp blow, especially with the fist.

b. A joke is a thing that someone says to cause amusement or laughter, especially a story with a funny punchline.

c. Satire is the use of humour, irony, exaggeration, or ridicule to expose and criticize people's stupidity or vices, particularly in the context of contemporary politics and other topical issues.

d. A gag is a joke or an amusing story, especially one forming part of a comedian's act, or in a film.

‘Hilarious satires’ and ‘hilarious jabs’ seem inappropriate and ambiguous. Among all the options, ‘jokes’ and ‘gags’ fit perfectly in the blank. Therefore, option D is the apt answer.


Which of the following is MOST OPPOSITE in meaning to Locus?

Solution: Locus (noun) -a particular position or place where something occurs or is situated.

The ratio between the speed of a bus and train is 15 : 27, respectively. Also, a car covered a distance of 720 km in 9 h. The speed of the bus is three- fourth of the speed of the car. How much distance will the train cover at 7 h?


speed of car = distance covered / time taken

720 / 9 = 80 km/h

Now, speed of bus = 3 / 4 x 80 = 60 km/h

Speed of train = 27 / 15 x 60 = 108 km/h

Distance covered by train in 7 h = 108 x 7 = 756 km


The Union Sports Ministry has approved five lakh rupees from the National Welfare Fund for Sportspersons for Kaur Singh who is suffering from heart disease. Kaur Singh is associated with which of the following sports?


Kaur Singh, former heavyweight Boxer is struggling with the treatment for heart disease and admitted at a private hospital in Mohali. Under such circumstances, the Union Sports Ministry has approved five lakh rupees from the National Welfare Fund for Sportspersons for Kaur Singh.


Direction: In the following table data is given about an electronic shop. Some data is given and some data is hidden. Study the given data carefully and answer the related questions given below.

Selling price of T.V is what percent of Marked price of laptop?


Selling price of T.V = 5000 x 100 / 10 x 90 / 100 = 45000

Marked price of laptop = 45000 + 15000 = 60000

Required % = 45000/60000 x 100 = 75%


Direction: In the given question below there are three statements followed by two conclusions numbered I and II. You have to take the given statements to be true even if they seem to be at variance with commonly known facts. Read all the conclusions and then decide which of the given conclusions logically follows from the given statements disregarding commonly known facts.


All oils are sands

Some clays are oils

All clays are rocks


I. At Least some clays are sands

II. Some oil is not rock



All oils are sands

Some clays are oils

All clays are rocks

Combining all three statements, we get


I. At least some clays are sands

II. Some oil is not rock

Conclusion I

Some clays are oils + All oils are sands = Some clays are sands

Hence, Thus, the conclusion I follow.

Conclusion II

Some clays are oils → conversion → some oils are clays + All clays are rocks = Some oils are rock. Hence, conclusion II does not follow.


Direction: In the given question, the 1st part of the sentence is given. The rest of the sentence/passage is split into four parts and named A, B, C and D. These four parts are not given in their proper order. Read the sentence and find out which of the four combinations is correct.

1) According to Indian Express, on Sunday, six men reached a South Delhi businessman's house in Malviya Nagar in a Tata Safari car bearing the Haryana government’s sticker fixed on the windscreen.

(A) One of the guys first took away all the cell phones of the businessman’s family members alleging that they had come on government duty to investigate a tax evasion charge.

(B) The plan could have been successfully executed but one of the family members found their behaviour suspicious.

(C) When the family member raised an alarm about the same, about 150 people from the same locality gathered outside the trader's house and the con men were beaten up and interrogated before they were handed over to the police.

(D) They “searched” the house, moving from room to room, and collected Rs 20 lakh in cash that they kept in their cars.


The first sentence 1 introduced a situation, and the rest of the sentences should be arranged in the order that they happened. Clearly A is the first in sequence as it uses the word 'first' indicating the first step of these six men. The next step is described in D. Now, the twist comes in sentence C as the suspicions rise. People cannot get suspicious of something unless something actually happened. So, we place A first, followed by D and B. This leaves C for the last, which describes the result of those suspicions. Hence, the correct answer is d.


Consider the following conditions:

1. tp < Δt

2. Δt < T

3. tp > Δt

4. Δt > T

Where, tp = pulse width,

Δt = propagation delay and

T = clock time period.

The race around condition in the Flip-Flop can be avoided if conditions

Solution: Condition to avoid Race around problem is tp < Δt < T.

Consider the following schedules involving three transaction:

S1 : W2(x), W1(x), R3(x), W2(y), R3(y), R3(z), R2(x), R1(y)

S2 : R2(z), W2(x), W2(y), R1(x), R3(x), R2(z), R3(y), W1(x)

Which of the above schedules are conflict serializable?

Solution: A schedule is serializable if the precedence graph does not contain any cycle.

It contains cycles so it is not serializable.

It contains no cycle so is serializable.

So option (C) is correct.


Consider the grammar defined by the following production rules:

S → A * C

A → B + A | B

B → A – B | A

A → id

B → id

C → id

Which of the following is true?


+ and – are both right associative and + has higher precedence than*. So the correct option is (c).


The output waveforms of a counter circuit shown below:

The counter is

Solution: The waveform is of the ring counter because in one clock period only one flip-flop output is active and the same is repeating.

For k number of users, how many keys are needed using private key cryptography and public key cryptography schemes respectively?


In symmetric ⇒ Asymmetric ⇒ 2k

Explanation for asymmetric:

Every user has a (public key, private key) pair.

1 user ⇒ 2 keys

k user ⇒ 2k keys

Hence option (C) is the right answer.


A binary operation Ηon a set of integers is defined as x⊙y=x2+y2+2xy. Which one of the following statements is true aboutΗ?

Solution: 1.Check for commutative


x2 + y2 + 2xy = y2 + x2 + 2yx

Since LHS = RHS

So ⊙ is commutative.

2. Check for associative:


(x2 + y2 + 2xy) Η z = x Η ( y2 + z2 + 2yz)

x4 + y. + 4x2y2 + 2x2y2 + 4xy3 + 4x3y + z2 + 2x2z + 2y2z + 4xyz ≠ x2 + y4 + z4 + 4y2z2 + 2y2z2 + 4y3z + 4yz3 + 2xy2 + 4xyz

So A is not associative.


A token bucket scheme is used for traffic shaping. A new token is put into the bucket every 10 μsec. Assume each token picks one packet which contains 2 bytes of data. It is observed that the initial capacity of the bucket is 10 Mbits. The computer can transmit at the full speed of 8 Mbps for ________ (in seconds upto 2 decimal places)

Solution: We know,

C + R × S = M × S

Where, C = Initial capacity

R = Token rate

M = Output rate

S = Bursty traffic

Given, C = 10 Mbits

Token arrives at an interval of 10 μsec.

Then in 1 sec 100000 token arrives.

So, 100000 × 16 bit

= 16 × 105 bits/sec

= 1.6 Mbps

Hence R = 1.6 Mbps

Substituting we get

S = = 1.5625


The incorrect match (when n > 1) is

Solution: MD model has n-control units and since in multiprocessing, it requires n ALU units also.

An Internet Service Provider (ISP) has a block There are 3 groups, Group1 has 128 customers and each requires 64 IP addresses. Group2 has 64 customers and each requires 256 IP addresses. Group3 has X customers and each requires Y IP addresses. After successfully completing customer requests only 38K IP address left with (ISP)What can be the possible value of X and Y respectively.


38 × 210 = [216 – [Group1 + Group2 + Group3]]

38 × 210 = [216 – [27 × 26 + 26 × 28 + 2m × 2n]]

2x × 2y = 216 – 213 – 214 – 38 × 210

= 210[26 – 23 – 24 – 38]

= 210[64 – 8 – 16 – 38] = 210 × 21

2x × 2y = 211

Option (d), which 26 × 25 = 211


Let R be a relation on the set A = {1, 2, 3}, such that R = {(1,1), (2,2), (3,3), (1,2)}. Now consider the following relations.

I. {(1,1), (2,2), (3,3)}

II. {(1,1), (2,2)}

III. {(1,1), (2,2), (3,3), (1,2)}

Which of the above correctly represent(s) the smallest reflexive closure of R?

Solution: The common mistake here is to pick both I and III as the answer, which is wrong. Why? Because first of all in order for a relation T (say) to be reflexive closure of a relation R, then firstly T must be a superset of R, and only then we think about reflexivity, So I is actually a subset of R and thus cannot be the reflexive closure of R. II does not contain (3,3) and therefore is not reflexive, So the correct answer is choice (c).

The sorting algorithm which requires least number of swaps in the worst case is


Insertion Sort ⇒ O(n2)

Selection Sort ⇒ O(n)

Bubble Sort ⇒ O(n2)

Quick Sort ⇒ O(n2)

Amongst all these algorithms, selection sort requires the least number of swaps.


We are given an array A in which every element is either 0 or 1. The time complexity of the most efficient algorithm which sorts A in descending order is equal to

Solution: The simplest way is to scan the entire array once, and maintain a count of the number of 0's (zero_count) and 1's in the array (one_count) - for every 0 encountered, increment the zero_count and similarly do the same for the 1's also.

And then overwrite the array by first filling the array with 1's - the number of 1's being equal to one_count value, and do the same for 0's also.

All this will take O(n) time and (A) is the answer.


A 4-way set associative cache has lines of 32 byte and a total cache size of 16 KB. Which of the following main memory blocks is mapped onto the set ‘13’ of the cache memory when 16 MB of main memory is used?


Number of lines =

Number of sets =

Cache representation

Physical address size = 16 MB = 24 bit

24 = x + 7 + 5

x = 12 bit

Now, to map physical memory at 13th set bit (b11 b10 b9 b8 b7 b6 b,) MM address should be 13.

In option (d)

Hence option (d) is correct.


Consider the following relations, SQL query and given instances of relations: (where keys are underlined)

Student (snum, sname)

Enroll (snum, cname)


S.snum NOT IN (SELECT E.snum FROM Enroll E)

Number of tuples returned by the SQL query is ________.



S.snum NOT IN (SELECT E.snum FROM Enroll E)

It return snum of all students who is enrolled in any course.

Query return the sname of a student who is not enrolled in any course.

SQL does not eliminates duplicate so relation given by SQL query is

Total 2 tuple returns.


Consider two languages, L1and L2:

L1= {an| n > = 0} and L2 = {bn | n > = 0}

Which of the following correctly represents L1⋅ L2, where ‘⋅’ is the concatenation operation?


L1 . L2 will be equal to {an bm| m , n > = 0}, which is same as {an bm| m = n, n > –1}.


Number of binary trees formed with 5 nodes are

Solution: Possible number of binary trees formed when n number of nodes are given is 2nCn / n+1 so in this case the number of nodes are 5 so

Number of binary trees possible are = 10C5 / 6 = 10!/ 5! * 5! * 6 → 42

Hence option D is the correct answer

Total number of different Binary tree of size

5 : 14 + 5 + 4 + 5 + 14 = 42


The Boolean function f implemented in the figure using two input multiplexers is

Solution: f = E.A

E =

∴ f =


The number of colours required to properly colour the vertices of every planar graph is

Solution: According to the 4-colour theorem states that the vertices of every planar graph can be coloured with at most 4 colours so that no two adjacent vertices receive the same colour.

Hence, Option (C) 4 is the correct choice.


Consider the following statements about simple connected undirected graph having more than 2 vertices:

1) At least two vertices have the same degree

2) At least three vertices have the same degree

Which one of the above statements hold true?

Solution: As the graph is simple, there is no self loop or parallel edge. As the graph is connected, no vertex can have 0 degree and hence, the degree range from 1 to n-1 which implies that the degree of at least two vertices must be the same.

Given a combinational circuit below:

(2 X 1 multiplexer are being used)

What will be the sum minterms at output f?


f = ( C’ + BC ) D + A D’

f = C’ D + BCD + AD’

Min-terms that represent f are

C’ D - 0 0 0 1, 0 1 0 1, 1 0 0 1, 1 1 0 1

B C D - 0 1 1 1, 1 1 1 1

A D’ - 1 0 0 0, 1 0 1 0, 1 1 0 0, 1 1 1 0

f = min-terms (1 , 5 , 7 , 8 , 9 , 10, 12 , 13 , 14 ,15)


1 + 5 + 7 + 8 + 9 + 10 + 12 + 13 + 14 + 15 = 94.


A bolt is manufactured by 3 machines A, B and C. Machine A turns out twice as many items as B, and machines B and C produce an equal number of items. 2% of bolts produced by A and B are defective and 4% of bolts produced by C are defective. All bolts are put into 1 stockpile and 1 is chosen from this pile. The probability that it is defective is ____.

Solution: Required probability - Chosen a defective bolt from Machine A + Chosen a defective bolt from Machine B + Chosen a defective bolt from Machine


= 0.025


Which of the following operations is closed for the recursively enumerable languages?

Solution: Complement and Difference operations are not closed but Kleene closure is closed for RELs.

From the following instance of relational schema R (A, B, C), We can conclude that:

Solution: A functionally determines B

B does not functionally determine, C because for B = 4, C has two values 4 and 0

A does not functionally determine, C because for A = 4, C has two values 4 and 0


Consider the following three address code tables

Which of the following expression represents the above three address code (quadruple notation)



t2=b ×t1



⇒ a=a+b×(-c)

Option C is correct.


Match the following groups.


A). Allocation

B). Relocation

C). Loading

D). Linking


I. Resolve the symbol references.

II. Alters the address of instructions and data.

III. Makes the program ready to execute by keeping the machine code in main memory.

IV. Assigns the required memory space for the program.


Allocation: Loader allocates the required memory space for the program to execute properly.

Relocation: It can alter the address of instructions and data during execution.

Loading: It loads the program machine code and makes the program ready to execute.

Linking: It resolves the symbolic references made in the object modules.


Given a relation is in 3NF, Which of the following can be inferred from this?


Each non key attribute is determined by the super key,

A relation C-> D is in 3NF if,

1) C is a super key


2) D is a prime attribute

If D is a non prime attribute then C must be a super key.


For the given instructions, all type of data dependencies(RAW, WAW, WAR) are present.

STORE R1, 0[R2]

LOAD R5, 24[R8]

STORE R3, -8[R9]

Then which of the following is true?


From the given instructions clearly,

- RAW exists if (R2+0) == (R8+24)

– WAR exists if (R8+24) == (R9 – 8)

– WAW exists if (R2+0) == (R9 – 8)


An AVL tree is constructed by inserting the following sequence of elements into empty AVL tree. After building an AVL tree, if an element ‘4’ is deleted from it, find how many levels are present in the AVL tree.

7, 4, 9, 5, 4.5, 6, 5.5, 5.2


7, 4, 9, 5, 4.5, 6, 5.5, 5.2

Thus, 3 levels are present in the final AVL tree.


A state diagram of a logic which exhibits a delay in the output is shown in the figure, where X is the do not care condition

The logic gate represented by the state diagram is


If any one of the inputs is zero, output is logic ‘1’. Otherwise output is logic ‘0’, which represents the NAND gate.


There are five buildings A, B, C, D, E in a row. You are given the following statements:

E is to the east of C and west of A A is to the west of B

B is to the west of D

Which building is in the middle?


As E is east of C and westof A: Hence, C E A A is to the west of B: C E A B

B is the west of D: C E A B D


Four channels are multiplexed using TDM. If each channel sends 100 bytes/second and we multiplex 1 byte per channel, then the bit rate for the link is ……………bps


Firstly we understand the working of Multiplexer using TDM.

Each frame contain 1 byte from each channel; { 1 Byte = 8 Bit}

we have 4 channels

Then ,the size of each frame is

1x4= 4 bytes = =~ 32 bits.

Each channel is sending 100 bytes/second

A frame carries 1 byte from each channel,

The frame rate must be 100 frames per second. { its given}

Then the total rate is = 32×100 = 3200 bits/second


If it takes 50ns to search associative registers and also about 100ns to get access to main memory then find out the % of slowdown in memory access time? (Given hit ratio 90%).


Effective access time = (hit ratio) + (memory access time + search time in associative registers) + (fail ratio) × (search time in associative registers)

= (0.90 × 150) + (0.10 × 250)

=160 ns

% slowdown = 160-100= 60 ns.



void main(){

int k,s=0;

int arr[]={5,9,2,6,0,1,8};

char str[]={"Gradeup"};

for(int k=0;k<7;k++)






What will be the output of the above code?


if(((int)str[k]%2)==0) // if ASCII value of character of char array str is even then if condition is true

(int)str[k]=> indicates ASCII value of character of character array str

In string “Gradeup”, only r, d, p characters have even ASCII value,so these are printed, along with this element of int array arr having same index to that of character having even ASCII value is also printed.


Consider the C program below.

#include int *A, stkTop;

int stkFunc(int opcode, int val)


static int size=0, stkTop=0;

switch (opcode) {

case -1: size = val; break;

case 0: if (stkTop < size) A[stkTop++] = val; break; default: if (stkTop) return A[--stkTop];


return -1;


int main()


int B[20]; A = B; stkTop = -1;

stkFunc (-1, 10);

stkFunc ( 0, 5);

stkFunc ( 0, 10);

printf ("%d\n", stkFunc(1, 0) + stkFunc(1,0));


The value printed by the above program is ___________.


The code in main, basically initializes a stack of size 10, then pushes 5, then pushes 10. Finally the printf statement prints the sum of two pop operations which is 10 + 5 = 15.

stkFunc (-1, 10); // Initialize size as 10

stkFunc (0, 5); // push 5

stkFunc (0, 10); // push 10

// print sum of two pop

printf ("%d\n", stkFunc(1, 0) + stkFunc(1, 0));


Consider the following set of relation schemas





Consider the following FD’s and tell the normal form in which the relations exist.










(ROLLNO, DOB), (NAME, DOB) and (ROLLNO, COURSENO) are the candidate keys.

The DOB →AGE is a partial dependent FD for the candidate key. So, the relation is in 1NF.

Thus, none of the given options are true.


AB + tree index is to be built on the name attribute of the relation ‘student’. Assume that all the students' names are of length 8 bytes, disk blocks are of size 512 bytes and index pointers are of size 14 bytes. Given this scenario that would be the best choice of the degree (no. Of pointers per node) of the b+ tree?


order of the internal node is P1.

CP + (P1 - 1) ×KV <= BLOCK SIZE

Child Pointer (CP) = 8 bytes (students name is a child pointer)

Key Value (KV) = 14 bytes

Block Size = 512 bytes

8 + (P1 - 1) × 14 = 512

P1 = 37


Consider the relation

Students(Rollno, Name, Marks)

Where rollno is the primary key.

Now we would like to rank the students according to the decreasing marks. The student with the highest marks gets rank 1. Ties are not broke but ranks are skipped.

Now consider 2 queries.

Query1: SELECT A .Name, count (B .Name)

From Students A, Students B

Where A.Marks <= B.Marks group by A .Name

Query2: SELECT A .Name, 1+count (B .Name)

From Students A, Students B

Where A.Marks < B .Marks group by A .Name


Both the queries generate the same result but none of them sort the students according to the decreasing marks.


Consider the following set of relation schemas





Consider the following SQL Query: -

Select distinct Name, Rollno

From Students, Courses, Grades

Where Students.Rollno = Grades.Rollno) and (Courses.Instructor = ‘Mohan’) and (Courses.Courseno = Grades.Courseno) and Grades.Grade = ‘A’

Which of the following sets is computed by the above query?


Use of distinct selects Name and rollno only once. So, irrespective of how many times a person has got an A grade, his name would appear only once in the output.


Regular languages are


According to Chomsky hierarchy, regular languages come under type 3 i.e. level 3 language class.


Which of the following is correct output for the program code given below?

main( )


void pr( );

pr ( );

pr ( );

pr ( );

void pr ( )


static int i = 1;

printf (“%c”, (65+ i ++));




The correct output is “BCD” when the function pr ( ) is first called the value of i is initialized to 1.

After the pr ( ) completes its execution i = 2 is retained for it’s next call as “i” is a static variable.

∴ 65 + 1 = 66 = B

65 + 2 = 67 = C

65 + 3 = 68 = D

∴ BCD is the correct output.


Which switching technique is used in the telephone network?


Circuit switching technique is used in telephone networks. In this technique a dedicated network path is established for communication, for this, when two persons talking on telephone through one network path, no one else can use that path even if no talking (means no signal transfer through that path) is done.


A hash table of length 10 is taken for insertion of the keys with hash function h(key)= key mod 10. If Collision occurs, it is resolved with quadratic probing. The following sequence of keys are inserted:

46, 36, 34, 24, 52, 57, 56

Which of the following cannot be inserted to the table due to quadratic probing?


Insertion of 46, H(46)= 46 mod 10= 6, inserted at 6th position

Insertion of 36, H(46)= 46 mod 10= 6,

Collision occurs, hence, quadratic probing is applied,

QP (key, I)= (h(key)+i+ i2) mod m

At i=1, QP (36, 1) = 8

So 36 will be inserted at 8.

Insertion of 34: It can be inserted at place 4 in the hash table.

Insertion of 24:h(24)= 24 mod 10= 4

Collision will occur for key 24. For resolving the collision, Quadratic probing is resolved

QP (24, 1)= 6, again Collision

QP (24, 2)= 0 o collision is resolved.


Match the following:

Which option is correct :



A wireless network interface controller can work in-


An 802.11 WNIC can operate in two modes known as ad hoc mode and infrastructure mode. In an ad hoc mode network the WNIC does not require an access point, but rather can interface with all other wireless nodes directly. All the nodes in an ad hoc network must have the same channel and SSID. Infrastructure mode is an 802.11 networking framework in which devices communicate with each other by first going through an Access Point (AP). In infrastructure mode, wireless devices can communicate with each other or can communicate with a wired network.

Hence, the correct option is (c).


Find the value of common digit (in decimal system) in 15's and 16's complement of (2E0)H


First find 15's complement, for that subtract all digits by F






Now to find 16's complement, add 1


+ 1




So in both above results, 'D' is common whose value in decimal system is 13


A B-Tree used as an index for a large database table has six levels including the root node. If a new key is inserted in this index, then the minimum number of nodes that could be newly created in the process are


No nodes will be newly created if the new node is simply placed on the leaf level. Since the minimum is asked, it will be 0.


The memory access time is 1 nanosecond for a read operation with a hit in cache, 5 nanoseconds for a read operation with a miss in cache, 2 nanoseconds for a write operation with a hit in cache and 10 nanoseconds for a write operation with a miss in cache. Execution of a sequence of instructions involves 100 instruction fetch operations, 60 memory operand read operations and 40 memory operand write operations. The cache hit-ratio is 0.The average memory access time (in nanoseconds) in executing the sequence of instructions is __________.


Total instruction = 100 instruction fetch operation + 60 memory operand read operation + 40 memory operand write op

= 200 instructions (operation)

Time taken for fetching 100 instructions (equivalent to read)

= 90 × 1ns + 10 × 5 ns = 140 ns

Memory operand Read operations = 90% (60) × lns + 10% (60) × 5ns

= 54ns + 30ns = 84 ms

Memory operands write operation time = 90%(40) × 2ns + 10%(40) × 10ns

= 72ns + 40ns = 112 ns

Total time taken for executing 200 instructions = 140 + 84 + 112 = 336 ns

∴ Average memory access time = 336 ns/200 = 1.68ns


The order of an internal node in a B+ tree index is the maximum number of children it can have. Suppose that a child pointer can take 6 Bytes, the search field value takes 14 Bytes and the block size is 512 Bytes. What is the order of the internal node?


The order of internal node is = 6*n + (n-1)*14 ≤ 512 = 6n + 14n – 14 ≤ 512

= 20n ≤ 528 = n ≤ 26


Let us say you positive integers a and b are taken from the user and then they are fed to the following function:

void function(int a, int b){

while( a != b){

if( a > b )

a = a - b;


b = b - a;


printf(“%d”, b);


What does the above function compute?


This method is Euclid’s algorithm of finding GCD of two numbers. It is based on the fact that the GCD of two numbers doesn’t change if you replace the larger number with its difference with the smaller number.


Consider the values of A = 2.0 × 1030, B = -2.0 × 1030, C = 1.0, and the sequence

X: = A + B Y:= A + c

X: = X + C Y:= Y + B

Executed on a computer where floating point numbers are represented with 32 bits. The values for X and Y will be


The given input is a 32-bit representation. The maximum precision value will be 32 bits. It has 10 digits.

A = 2.0 × 1030

B = -2.0 × 1030

C = 1.0,

If we add the value A and C means we will get 31st digit to 1, which will go outside the level of A. This addition’s result will return the A value which is assigned to Y. Y+B result is 0.0. X+C result will return 1.0. So option B is the Solution.


Identify the minimal product-of-sums function described by the K-map given in the figure. Where ϕ is don’t care


A’C’ is the minimal POS


Let A= 1100 1010 and B= 0000 0100 be two 8-bit 2's complement numbers. Their product in 2's complement is


A= 1100 1010, since MSB=1 hence the number is negative.

2’s complement of A= 00110110

A= -54

B= 0000 0100

B= 4 (Since the number is positive so there is no 2’s complement).

Now product of A*B= -54*4 = 216.

Binary representation of -216= 1101 1000.

2’scomplement of -216= 0010 1000.


How many of the following statements are true?

1) Function must be neutral function is a necessary as well as sufficient condition for a function to be a dual function

2) For a n variable function, there are 2n-1 mutually exclusive pairs.

3) f(x,y,z) = Σm( 1 , 2 , 4 , 6 ) is a dual function.

4) Dual functions are a subset of Neutral functions.


Only statements b, d and e are correct statements. As a function should be a neutral function, to be a dual function is only a necessary condition, not the sufficient one.


Consider the following data:

Suppose round-robin scheduling is applied to the given data with time quantum=2 units. It is also given that scheduling of a process or context switch will take 1 unit of time. What are the completion time and turnaround time of process P4?


Here, TQ = 2 units

Also, every scheduling OT context switch will take the overhead of 1ns. (Assume & represent overhead)

The Gant Chart will look like

Hence, completion time = 30 units

& twin around time = completion time – Arrival time

= 30 – 5

= 25 units


Which of the following flip-flops is used to avoid race around problems?


Master-Slave flip flop is free used to avoid the race around condition.

Use Code STAYHOME200 and get INR 200 additional OFF
Use Coupon Code