Sunday, 21 July 2019

UGC NET Computer Science July 2018 - II | Question 23

Question 23
A hash function h defined h(key)=key mod 7, with linear probing, is used to insert the keys 44, 45, 79, 55, 91, 18, 63 into a table indexed from 0 to 6. What will be the location of key 18 ?

Options:
  1. (1) 3
  2. (2) 4
  3. (3) 5
  4. (4) 6
Answer : (3) 5

Explanation Question 23

Given:
Hash table has indexed from 0 to 6.
keys are 44, 45, 79, 55, 91, 18, 63
h(key)=key mod 7  ( h(key) value is in range of 0-6 inclusive)

Solution:

Table after inserting 44, 45
h(key)= key mod 7
h(44) = 44 mod 7 = 2
h(45) = 45 mod 7 = 3
44 is placed position 2 and 45 is placed at position 3.

0 1 2 3 4 5 6
 -   -  44 45  -   -   - 

Table after inserting 79
h(79) = 79 mod 7 = 2
but 2 is already filled by 44, linear probing is applied but 3 is also filled by 45.
To apply linear probing, we check for the next unoccupied position in the table.
So, 79 will occupy 4.

0 1 2 3 4 5 6
 -   -  44 45 79  -   - 

Table after inserting 55, 91
h(55) = 55 mod 7 = 6
h(91) = 91 mod 7 = 0
55 is placed position 6 and 91 is placed at position 0.

0 1 2 3 4 5 6
91  -  44 45 79  -  55

Table after inserting 18
h(18) = 18 mod 7 = 4
but 4 is occupied by 79 so, it will occupy 5.

0 1 2 3 4 5 6
91  -  44 45 79 18 55

Table after inserting 63
h(63) = 63 mod 7 = 0.
0 is also occupied so, it will occupy 1.

0 1 2 3 4 5 6
91 63 44 45 79 18 55

So, option (3) is correct.

PreviousNext
UGC NET CS 2018 July - II Question 22UGC NET CS 2018 July - II Question 24

UGC NET Computer Science July 2018 - II Question 22

Question 22
22. Consider the array A=<4, 1, 3, 2, 16, 9, 10, 14, 8, 7>. After building heap from the array A, the depth of the heap and the right child of max-heap are _________ and _________ respectively. (Root is at level 0).

Options:
  1. (1) 3, 14
  2. (2) 3, 10
  3. (3) 4, 14
  4. (4) 4, 10
Answer : (2) 3, 10

Explanation Question 22

The depth of the max-heap is 3

The right child of max-heap is 10

NTA UGC NET Computer Science 2018 July - II Question 22 - Max heap from array
Max-heap from the array A =<4, 1, 3, 2, 16, 9, 10, 14, 8, 7>

PreviousNext
UGC NET CS 2018 July - II Question 21UGC NET CS 2018 July - II Question 23

Saturday, 20 July 2019

UGC NET Computer Science July 2018 - II Question 17

Question 17
17. A software design pattern often used to restrict access to an object is :

Options:
  1. (1) adapter
  2. (2) decorator
  3. (3) delegation
  4. (4) proxy
Answer : (4) proxy

Explanation Question 17
  • Proxy Pattern → We need the ability to control the access to an object. The light objects are called proxies and they will instantiate those heavy objects when they are really need and by then we'll use some light objects instead.  Use of the proxy can simply be forwarding to the real object or to provide additional logic. A proxy is a Interface or wrapper or agent object. Proxy is being called by the client to access the real object serving behind the scenes. 
    Read more about - Proxy Pattern
  • Adapter → Match interface of different classes.
  • Decorator → Add responsibilities objects dynamically. Effectively in the instantiation process, object-creation patterns use delegation effectively to get the job done.
  • Delegation → In software engineering, the delegation pattern is an object-oriented design pattern that allows object composition to achieve the same code reuse as inheritance. In delegation, an object handles a request by delegating to a second object (the delegate). The delegate is a helper object, but with the original context.
From above definations we conclude that "Proxy is a software design pattern often used to restrict access to an object"

So, Option (4) is correct answer.

Similar Questions:

1. A design pattern used to enhance the functionality of an object is
(a) Adapter
(b) Decorator
(c) Delegation
(d) Proxy

2. A design pattern often used to restrict access to an object is
(a) Adapter
(b) Decorator
(c) Delegation
(d) Proxy

3. You have a class that accepts and returns values in British Imperial units (feet, miles, etc.), but you
need to use metric units. The design pattern that would best solve your problem is
(a) Adapter
(b) Decorator
(c) Delegation
(d) Proxy

Question Reference::https://courses.cs.washington.edu/courses/cse331/18sp/exams/cse331-12sp-final-sol.pdf

Wednesday, 12 June 2019

NTA UGC NET 2019: Registration started, check eligibility, syllabus and how to apply online

NTA UGC NET 2019: Registration started on 1st March 2019, check eligibility, syllabus and how to apply online

NTA UGC NET 2019: The online Registration and application process began tomorrow for the NTA UGC NET 2019 June examination. All the candidates who want to apply can do so through the official website, ntanet.nic.in. The registration will start on March 1 and close on March 30. NTA will conduct UGC NET June 2019 on behalf of the University Grants Commission (UGC).
Online registration for nta net exam June 2019 (the Assistant Professor and JRF eligibility test) starts on 1st March 2019, apply Online at official nta website ntanet.nic.in or nta.ac.in. This time two papers will be conducted in a single 3 hour duration.
The exam will be held in 84 subjects at 91 selected cities across India over a multiple sessions for 7 days (June 20, 21, 24, 25, 26, 27 and 28). 
NTA UGC-NET, June 2019 will be conducted with the new syllabi, available on the website of UGC-NET  ugc net syllabus 2019: Paper 1 & Paper 2- Download PDF

IMPORTANT INFO. AND DATES: UGC-NET JUNE 2019

To Fill Application Form - UGC NET June 2019 some criteria and eligibility are as below in short:
Online submission of Application Form (upto 11:50 pm of 30 March, 2019) 01–30 March, 2019
Fee Payable by Candidates: General/Unreserved-->Rs. 800/-
Other Backward Classes (OBC)- (NCL)*/Economically Weaker Section (EWS)** -->Rs. 400/-
SC/ST/PwD/ Transgender --> Rs. 200/-
(Processing charges & GST are to be paid by the candidate, as applicable)
Correction in particulars of Application Form on website only: 07-14 April, 2019
Downloading of Admit Cards from NTA website: 15 May, 2019
Dates of Examination: 20, 21 June, 24, 25, 26, 27, 28 June, 2019
Duration of Examination: 180 minutes (03 hours) No break between Paper 1 & Paper 2
Timing of Examination: First Shift: 9.30 am to 12.30 pm, Second Shift: 02.30 pm to 05.30 pm
Centre, Date and Shift of UGC-NET Examination:  As indicated on Admit Card
Display of Recorded Responses and Answer Keys: To be announced later
Website(s): www.nta.ac.in, www.ntanet.nic.in
Declaration of Result on NTA website by:  15 July 2019

Eligibility
(i) Candidates who have secured at least 55% marks (without rounding off) in Master’s Degree
or equivalent examination from universities/institutions recognized by UGC (on the website:
Humanities (including languages) and Social Science, Computer Science and Applications,
Electronic Science etc. (list of subjects at Post Graduation level attached as Annexure-IV)
are eligible for this Test. The Other Backward Classes (OBC) belonging to Non-Creamy
Layer/Scheduled Caste (SC)/Scheduled Tribe (ST)/Persons with Disability
(PwD)/Transgender category candidates who have secured at least 50% marks (without
rounding off) in Master’s degree or equivalent examination are eligible for this Test.

(ii) Candidates who are pursuing their Master’s degree or equivalent course or candidates who
have appeared for their qualifying Master’s degree (final year) examination and whose result
is still awaited or candidates whose qualifying examinations have been delayed may also
apply for this test. However, such candidates will be admitted provisionally and shall be
considered eligible for award of JRF/eligibility for Assistant Professor only after they have
passed their Master’s Degree OR equivalent examination with at least 55% marks
(50% marks in case of OBC-NCL /SC/ST/PwD//Transgender category candidates). Such
candidates must complete their Master degree or equivalent examination within two years
from the date of NET result with required percentage of marks, failing which they shall be
treated as disqualified. 
To read more ugc net eligibility visit  INFORMATION BULLETIN: UGC NET JUNE 2019

Age limit and Relaxation
(i) JRF: Not more than 30 years as on 01.06.2019. A relaxation of upto 5 years is provided to the candidates belonging to OBC (Noncreamy layer, as per the Central list of OBC available on website: www.ncbc.nic.in) SC/ST/PwD/ Transgender categories and to women applicants. Relaxation will also be provided to the candidates with research experience, limited to the period spent on research in the relevant/related subject of post-graduation degree, subject to a maximum of 5 years, on 5 production of a certificate from appropriat e authority. Three years relaxation in age will be permissible to the candidates with L.L.M. Degree. A relaxation of upto 5 years is provided to the candidates who haveserved in the armed forces subject to the length of service in the armed forces upto the first day of the month in which the concerned UGC-NET is to be held. Total age relaxation on the above ground(s) shall not exceed five years under any circumstances.
(ii) Assistant Professor:
There is no upper age limit for applying for Assistant Professor

Provision of Aadhaar:
The Aadhaar number is only one of the types of identification and is not mandatory. Candidates may also enter Passport number, Ration Card number, Bank Account number or any other valid Government identity number. For more visit the page 10 of content OR page 15 of  INFORMATION BULLETIN: UGC NET JUNE 2019

See the FEE DETAILS AND IMPORTANT DATES in INFORMATION BULLETIN: UGC NET JUNE 2019  

Monday, 1 April 2019

UGC NET CS 2018 July - II Question 54

Question 54
54. Normally user programs are prevented from handling I/O directly by I/O instructions in them. For CPUs having explicit I/O instructions, such I/O protection is ensured by having the I/O instructions privileged. In a CPU with memory mapped I/O, there is no explicit I/O instruction. Which one of the following is true for a CPU with memory mapped I/O ?
  1. (1) I/O protection is ensured by operating system routines.
  2. (2) I/O protection is ensured by a hardware trap.
  3. (3) I/O protection is ensured during system configuration.
  4. (4) I/O protection is not possible.
Answer: (1) I/O protection is ensured by operating system routines.

PreviousNext
UGC NET CS 2018 July - II Question 53UGC NET CS 2018 July - II Question 55

UGC NET Computer Science July 2018 - II Question 53

Question 53
53. In a multi-user operating system, 30 requests are made to use a particular resource per hour, on an average. The probability that no requests are made in 40 minutes, when arrival pattern is a poisson distribution, is ______ .
  1. (1) e-15
  2. (2) 1 - e-15
  3. (3) 1 - e-20
  4. (4) e-20
Answer : (4) e-20
Explanation Question 53

In 1 Hour = 30 Requests Sent
∴ In 60 minutes = 30 Requests Sent
So, in 40 minutes = (30 x 40) / 60 = 20 Requests Sent

Here 20 is Number of request Sent in 40 minutes.
Let λ is number of request in 40 minutes
∴ λ = 20

But according to given statement in question Actual requests are made in 40 minutes is ZERO.

Let x is actual requests in 40 minutes.
i.e. x = 0 (According to Question)

As arrival pattern is a poisson distribution,
So, Probablity ( x ) = ( e * λx ) / x !
∴ Probablity ( x = 0 ) = ( e-20 * λ0 ) / 0!
∴ Probablity ( x = 0 ) = e-20

So, option (4) is correct answer.

PreviousNext
UGC NET CS 2018 July - II Question 52UGC NET CS 2018 July - II Question 54

UGC NET Computer Science July 2018 - II Question 52

Question 52
52. In a paged memory, the page hit ratio is 0.40. The time required to access a page in secondary memory is equal to 120 ns. The time required to access a page in primary memory is 15 ns. The average time required to access a page is ______ .
  1. (1) 105
  2. (2) 68
  3. (3) 75
  4. (4) 78
Answer : (4) 78

Explanation Question 52

PAGE HIT = page present in ram or main memory
PAGE MISS = page fault so page swapped from the secondary memory
because we look for a page in secondary memory when the page is not present in the main memory, therefore, we need to add main memory lookup time.

Average access time
= hit ratio * primary memory access time + (1 – hit ratio) * secondary memory access time
Average access time = 0.4 * 15 + 0.6 * 120
Average access time = 6 + 72
Average access time = 78.

So, option (4) is correct answer.


Previous Next
UGC NET CS 2018 July - II Question 51 UGC NET CS 2018 July - II Question 53

UGC NET Computer Science July 2018 - II Question 51

Question 51
51. At a particular time of computation, the value of a counting semaphore is 10. Then 12 P operations and “x” V operations were performed on this semaphore. If the final value of semaphore is 7, x will be :

Options:
  1. (1) 8
  2. (2) 9
  3. (3) 10
  4. (4) 11
Answer : (2) 9

Explanation Question 51

Intially the value of a counting semaphore is 10 Now 12 P operation are performed.

Now counting semaphore value = -2

“x” V operations were performed on this semaphore

Final value of counting semaphore = 7
∴ ( “x” V operations + current counting semaphore value (-2) ) = 7
∴ x + (-2) = 7
∴ x = 7 + 2
∴ x = 9.

So, option (2) is correct answer.


PreviousNext
UGC NET CS 2018 July - II Question 50UGC NET CS 2018 July - II Question 52

UGC NET CS 2018 July - II Question 97

Question 97

97. Match the items in List - I and List - II :
List - I List -II
(a) Interrupts which can be delayed when a much highest priority interrupt has occurred (i) Normal
(b) Unplanned interrupts which occur while executing a program (ii) Synchronous
(c) Source of interrupt is in phase with the system clock (iii) Maskable
(iv) Exception
Code :
(a)(b)(c)
(1)(ii)(i)(iv)
(2)(ii)(iv)(iii)
(3)(iii)(i)(ii)
(4)(iii)(iv)(ii)

Options:
  1. (1)
  2. (2)
  3. (3)
  4. (4)
Answer : (4)

Explanation Question 97
  • (a) Interrupts which can be delayed when a much highest priority interrupt has occurred → (iii) Maskable
  • (b) Unplanned interrupts which occur while executing a program → (iv) Exception
  • (c) Source of interrupt is in phase with the system clock → (ii) Synchronous

→ Maskable Interrupt: The hardware interrupts which can be delayed when a much highest priority interrupt has occurred to the processor.

→ Exception: unplanned interrupts while executing a program is called Exception. For example: while executing a program if we got a value which should be divided by zero is called a exception

Reference : Types of Interrupts

→ Synchronous interrupt will happen every time an instruction executes (with a given program state)
Examples of Synchronous interrupt:
– Divide by zero
– System call
– Bad pointer dereference

Reference 2 : Two types of interrupts - Synchronous / Asynchronous


PreviousNext
UGC NET CS 2018 July - II Question 96UGC NET CS 2018 July - II Question 98

UGC NET CS 2018 July - II Question 95

Question 95
95. The hexadecimal equivalent of the binary integer number 110101101 is :
  1. (1) D24
  2. (2) 1BD
  3. (3) 1AE
  4. (4) 1AD
Answer : (3) 1AE

Explanation Question 95

Answer: 3

Group the given number in subgroup of 4 from right and assign alphabet when it exceeds 1001:
1010 – A
1011 – B
1100 – C
1101 – D
1110 – E
1111 – F
Given number is 110101101:
1101 – D
1010 – A
1 – 1

Hexadecimal equivalent iss 1AD.
So, option (D) is correct.


PreviousNext
UGC NET CS 2018 July - II Question 94UGC NET CS 2018 July - II Question 96

UGC NET Computer Science December 2019 | Question 16

Question 16 In a certain coding language. 'AEIOU' is written as 'TNHDZ'. Using the same coding language. 'BFJPV' wil...

Popular Posts