Search Previous Year Questions

Find real questions from previous competitive exam papers with answers and solutions.

Leave the keyword blank to browse saved questions for your selected exam, newest papers first. Add a keyword, year or topic to narrow the results.

Browse complete papers
Showing 10 question(s)
Clear

Question 81

HPCL Engineer 2017• Professional Knowledge

Interrupt generated due to which of the following operations does not belong to program-related interrupt category?

  1. AOption (a)

    Division by zero

  2. BOption (b)

    Attempt to execute an illegal machine instruction

  3. COption (c)

    Reference outside a user’s allowed memory space 

  4. DOption (d)

    Memory parity error

View answer & explanation

Correct answer

Answer: (d)D.

Memory parity error

Why this answer is correct

Interrupt generated by memory parity error does not belong to program – related interrupt category.

Explanation:

Memory parity errors are due to hardware failure or external elements. It means that one or more stored data values carries a different value when it’s recalled than when it was stored. Parity errors are caused by data corruption. Parity errors can bring back invalid commands for the computer.

Question 82

HPCL Engineer 2017• Professional Knowledge

Which of the following statements is TRUE?

  1. AOption (a)

    The cardinality ratio for a binary relationship specifies the maximum number of relationship instances that an entity can participate in.

  2. BOption (b)

    The cardinality ratio for a binary relationship specifies the minimum number of relationship instances that an entity can participate in.

  3. COption (c)

    The cardinality ratio for a binary relationship specifies the average number of relationship instances that an entity can participate in.

  4. DOption (d)

    The partial participation constraint is also called existence dependency.

View answer & explanation

Correct answer

Answer: (a)A.

The cardinality ratio for a binary relationship specifies the maximum number of relationship instances that an entity can participate in.

Why this answer is correct

Cardinality ratio:

It is a concept that describes binary relationship set and its types. (Binary relationship is that which connects two entities). Number of relationship instances in which the entity can participate is defined as cardinality ratio.

Four type of cardinality ratio can be possible:

  1. One to one

  2. One to many  

  3. Many to one         

  4. Many to many

Cardinality ratio is about the maximum number of entities of one entity set that are associated with the maximum number of entities of other set.

Participation: It specifies the minimum number of relationship instances that an entity can participate in.

Partial participation specifies that each entity in the entity set may or may not participate in the relationship instance. It is also called as optional participation.

Question 83

HPCL Engineer 2017• Professional Knowledge

Considering the process details given in the following table. What will be the completion order of the processes under the policies FCFS and RR (with CPU quantum of 2 time units)?

Process IDCPU BurstArrival Time
P153
P272
P350
  1. AOption (a)

    FCFS: P1, P2, P3 and RR: P1, P2, P3

  2. BOption (b)

    FCFS: P3, P2, P1 and RR: P3, P2, P1

  3. COption (c)

    FCFS: P1, P3, P2 and RR: P1, P2, P3

  4. DOption (d)

    FCFS: P3, P2, P1 and RR: P3, P1, P2

View answer & explanation

Correct answer

Answer: (d)D.

FCFS: P3, P2, P1 and RR: P3, P1, P2

Why this answer is correct

Completion order in case of FCFS: P3 P2 P1

Completion order in case of round- robin: P3 P1 P2

Question 84

HPCL Engineer 2017• Professional Knowledge

Which of the following statements about Secure shell Protocol is FALSE?

  1. AOption (a)

    SSH is network protocol

  2. BOption (b)

    SSH cannot be used for file transfer and e-mail tasks

  3. COption (c)

    SSH provides a secure client/server communication

  4. DOption (d)

    SSH runs on top of the TCP/IP layer

View answer & explanation

Correct answer

Answer: (b)B.

SSH cannot be used for file transfer and e-mail tasks

Why this answer is correct

Concept:

Secure shell protocol is a method for secure remote login from one computer to another. It provides the communication security and integrity with strong encryption.

Explanation:

It is a secure alternative to non – protected login protocols and insecure file transfer methods. It is a cryptographic network protocol. It provides a secure client/server communication and can be used for secure transfer of files and e-mails also.

So, given statement 2) SSH cannot be used for file transfer and e-mail tasks is false.

Question 85

HPCL Engineer 2017• Professional Knowledge

The counter implemented by the following circuit diagram where inputs to the NAND gate are the outputs of the B and C flip-flops. Is:

  1. AOption (a)

    MOD -8 Counter

  2. BOption (b)

    MOD-6 Counter 

  3. COption (c)

    MOD-7 Counter 

  4. DOption (d)

    MOD-4 Counter

View answer & explanation

Correct answer

Answer: (b)B.

MOD-6 Counter 

Why this answer is correct

CLR is an asynchronous input pin.

If CLR = 1, all flip flop outputs become 0.

\(\overline {CLR} = 0\) 

As output of NAND gate is to CLR which is negative triggered i.e.

\(\overline {CLR = CB} \)  

A is not as input here,

\(\overline {CLR} = \overline {CB\bar A} \) 

i.e. \(CLR = CB\bar A\)

in term of binary representation, it is CLR = 110

i.e. counter will count from 0 to 5 and at 6th clock flip flop output will be cleared.

So, it is a MOD – 6 counter.

Question 86

HPCL Engineer 2017• Professional Knowledge

Which of the following relationships holds for non-random-access memory, where Tn = average time to read or write n bits ta – average access time, n – number of bits and r – transfer rate in bits per second?

  1. AOption (a)

    Tn = Ta + n/r

  2. BOption (b)

    Tn = Ta + r/n

  3. COption (c)

    Ta = Tn + r/n

  4. DOption (d)

    Ta = Tn + n/r

View answer & explanation

Correct answer

Answer: (a)A.

Tn = Ta + n/r

Why this answer is correct

Average time to read or write n bits in a non – random access memory is :

Tn = Ta + n/r

where,

Tn = Average time to read or write n bits

Ta = average access time

n = number of bits

r = transfer rate in bits per second

Question 87

HPCL Engineer 2017• Professional Knowledge

Which of the following represents the language over the set A = {a, b} consisting of all words beginning with one or more a’s and followed by the same number of b’s?

  1. AOption (a)

    L = {ambm : m > 0}

  2. BOption (b)

    L = {a, ab, ab2, …}

  3. COption (c)

    L = {am bn : m > 0, n > 0}

  4. DOption (d)

    L = {bm abn : m ≥ 0, n ≥ 0}

View answer & explanation

Correct answer

Answer: (a)A.

L = {ambm : m > 0}

Why this answer is correct

Language over the set A = {a, b} consisting of all words beginning with one or more a’s and followed by the same number of b’s is number of a’s equal to number of b’s beginning with a.

Consider all the options one by one:

Option 1:   L = {ambm :m > 0}

It represents the required language. Number of a’s are equal to number of b’s where language always begins with a.

Option 2:  L = {a, ab, ab2, …}

In this, number of a’s are not equal to number of b’s

Option 3:  L = {am bn: m > 0, n > 0}

It also represents a language in which we have no relation between number of a and number of b.

Option 4:  L = {bmabn : m ≥ 0, n ≥ 0}

This language is starting with b which is not required. So, it is incorrect.

Question 88

HPCL Engineer 2017• Professional Knowledge

State TRUE or FALSE for the following.

i) A sine wave with a phase of 180° starts at time 0 with a zero amplitude. The amplitude is decreasing.

ii) If a signal changes instantaneously, its frequency is zero.

iii) In bipolar encoding. We use three voltage levels: positive, negative and zero,

iv) Infrared signals can be used for short-range communication in a closed area using ground propagation.

  1. AOption (a)

    i) TRUE, ii) FALSE, iii) TRUE, iv) FALSE

  2. BOption (b)

    i) FALSE, ii) TRUE, iii) FALSE, iv) FALSE

  3. COption (c)

    i) TRUE, ii) TRUE, iii) TRUE, iv) FALSE

  4. DOption (d)

    i) TRUE, ii) TRUE, iii) FALSE, iv) FALSE

View answer & explanation

Correct answer

Answer: (a)A.

i) TRUE, ii) FALSE, iii) TRUE, iv) FALSE

Why this answer is correct

Option 1: This statement is correct.

A sine wave with a phase of 180° starts at time 0 with zero amplitude and amplitude is decreasing. Sin wave is the most fundamental form of periodic analog signal.

Option 2: This statement is false.

Frequency is the rate of change with respect to time. Change in a short span of time means high frequency.

Option 3:  This statement is true. Bipolar encoding is a type of return – to – zero line code where two non-zero values are used. Three voltage levels are: positive, negative and zero.

Option 4: This statement is false.

Infrared signals can be used for short – range communication in a closed area using line of sight propagation.

Question 89

HPCL Engineer 2017• Professional Knowledge

In order to sort list of numbers using radix sort algorithm we need to get the individual digits of each number ‘n’ of the list. If n is a positive decimal integer. Then ith digit, from right, of the number n is:

  1. AOption (a)

    \(\left\lceil {\frac{n}{{{{10}^i} - 1;}}} \right\rceil % 10\)

  2. BOption (b)

    \(\left\lfloor {\frac{n}{{{{10}^i};}}} \right\rfloor % 10\)

  3. COption (c)

    \(\left\lfloor {\frac{n}{{{{10}^{i - 1}}}}} \right\rfloor % 10\)

  4. DOption (d)

    \(\left\lceil {\frac{n}{{{{10}^i};}}} \right\rceil % 10\)

View answer & explanation

Correct answer

Answer: (c)C.

\(\left\lfloor {\frac{n}{{{{10}^{i - 1}}}}} \right\rfloor % 10\)

Why this answer is correct

Radix sort algorithm performs digit to digit sort starting from least significant digit to most significant digit.

In radix sort algorithm, if we consider an array

We have to find the (a[i]/divisor) % 10.

If we have to get individual digit of each number n of the list and n is a positive decimal integer.

Then ith digit from right of the number n is:

\(\left\lfloor {\frac{n}{{{{10}^{i - 1}}}}} \right\rfloor % 10\) 

Suppose we have the number 542. Then we have to find the 3rd digit from the right end is :

\(\left\lfloor {\frac{{542}}{{{{10}^{3 - 1}}}}} \right\rfloor % 10\)  = 5

Question 90

HPCL Engineer 2017• Professional Knowledge

Which of the following is an NP-complete problem?

  1. AOption (a)

    CNF-Satisfiability problem

  2. BOption (b)

    Turing’s Halting problem

  3. COption (c)

    Number of Hamiltonian circuits in a complete graph of ‘n’ vertices with n > 2

  4. DOption (d)

    Presburger Arithmetic problem 

View answer & explanation

Correct answer

Answer: (a)A.

CNF-Satisfiability problem

Why this answer is correct

Concept:

NP complete problem is a class of computational problems for which no efficient solution algorithm has been found. No polynomial time algorithm is there for NP complete problem.

NP complete problem examples:

Travelling salesman problem, Hamiltonian cycle problem, clique problem, Subset set problem, CNF – Satisfiability problem.