Showing posts with label UGC NET CS. Show all posts
Showing posts with label UGC NET CS. Show all posts

Net 52

CBSE NET
Q. Convert the following infix expression into its equivalent post fix expression (A + B^ D) / (E – F) + G
(A) ABD^ + EF – / G+
(B) ABD + ^EF – / G+
(C) ABD + ^EF / – G+
(D) ABD^ + EF / – G+
Ans: (A)
Explanation: See the solution below.
Share:

Net 51

CBSE NET JUNE 2015 Paper II

Q. The in-order and pre-order Traversal of binary Tree are dbeafcg and abdecfg respectively. The post-order Traversal  is______.

A)dbefacg         
B)debfagc        
C)dbefcga                
D)debfgca

Ans: 
(D)

Explanation:

Inorder (Left, Root, Right),Preorder (Root, Left, Right),Postorder (Left, Right, Root)
Given, in-order=dbeafcg, pre-order=abdecfg.

Than, binary tree from in-order and pre-order become-
  
Post-order from above binary tree=debfgca
Share:

Net 50

CBSE NET JUNE 2015 Paper II

Q. A disk drive has 100 cylinders,numbered 0 to 99. Disk request come to the disk driver for cylinders 12,26,24,4,42,8,50 in that order. The driver is currently serving a request at cylinder 24. A seek takes 6msec per cylinder moved. How much seek time is needed for the shortest seek time first (sstf) algorithm?

A)0.984 sec         
B)0.396 sec         
C)0.738 sec                 
D)0.42 sec

Ans: (D)


Explanation:
SSTF, Shortest time first algorithm
Total cylinder head movements= 02+14+04+04+38+08=70.
Seek time needed=70 x 6 = 420=0.42 sec.
Share:

Net 49

CBSE NET

Q. A LRU page replacement is used with four page frames and eight pages. How many page faults will occur with the reference string 0172327103. if the four frames are initially empty.
A) 6              
B) 7                      
C) 5                    
D) 8.

Ans: (B)

Explanation: LRU (Least recently used) algorithm. Here, F shows page faults and H shows page hits.
   
0
1
7
2
3
2
7
1
0
3
0
0
0
0
3
3
3
3
0
0

1
1
1
1
1
1
1
1
1


7
7
7
7
7
7
7
7



2
2
2
2
2
2
3
F
F
F
F
F
H
H
H
F
F

Share:

Net 48

CBSE NET

Q. Consider an array A[20, 10], assume 4 words per memory cell and the base address of array A is 100. What is the address of A[11, 5] ? Assume row major storage.

(A) 560
(B) 565
(C) 570
(D) 575

Ans: (A)

Explanation:
Formula for calculating address of element in row major and column major order is as shown in below image.
 

Where,
B=Base address, w=element size, Nc=number of column, Nr=number of row, Lc=column lower bound, Lr=row lower bound.

Using formula of row major,

Address of (11,5) = 100+4(10(11-0)+(5-0))= 100+4(115)=560.
Share:

Net 47

CBSE NET

Q. An analog signal has a bit rate of 6000 bps and a baud rate of 2000 baud. How many data elements are carried by each signal element ?

(A) 0.336 bits/baud
(B) 3 bits/baud
(C) 120,00,000 bits/baud
(D) None of the above

Ans: (B)


Explanation: A same signal has bit rate of 6000bp and baud rate of 2000 baud. So 6000 = 2000 baud.  Hence a signal carried 3bits of data.
Share:

Net 46

CBSE NET

Q. In a demand paging memory system, page table is held in registers. The time taken to service a page fault is 8 m.sec. if an empty frame is available or if the replaced page is not modified, and it takes 20 m.secs., if the replaced page is modified. What is the average access time to service a page fault assuming that the page to be replaced is modified 70% of the time ?

(A) 11.6 m.sec.
(B) 16.4 m.sec.
(C) 28 m.sec.
(D) 14 m.sec

Ans: (B)

Explanation: Let number of page faults be 100. In which 30 page faults are without modification so time is 30x8=240 m.sec. And rest 70 page faults are with modification so time is  20x70=1400 m.sec.

Average access time of servicing a page fault is (240+1400)/100=28 m.sec.
Share:

Net 45

CBSE NET DECEMBER 2012 PAPER II


Q. Given an empty stack, after performing push (1), push (2), Pop, push (3), push (4), Pop, Pop, push (5), pop, what is the value of the top of the stack?


(A) 4
(B) 3
(C) 2
(D) 1


Ans: (D)


Explanation: See the image below:
Share:

Net 44

CBSE NET JUNE 2012 PAPER II


Q. Consider the following page trace :
4,3, 2, 1, 4, 3, 5, 4, 3, 2, 1, 5
Percentage of page fault that would occur if FIFO page replacement algorithm is used with number of frames for the JOB m = 4 will be


(A) 8
(B) 9
(C) 10
(D) 12


Ans: (C)


Explanation: F shows page fault using FIFO  page replacement algorithm.
In FIFO algorithm we see the elements which enter first in the memory, have to out first.

4
3
2
1
4
3
5
4
3
2
1
5
4
4
4
4
4
4
5
5
5
5
1
1
3
3
3
3
3
3
4
4
4
4
5
2
2
2
2
2
2
3
3
3
3
1
1
1
1
1
1
2
2
2
F
F
F
F
H
H
F
F
F
F
F
F
Share: