Engineering Online MCQ Number 0657 – online study, assignment and exam

Multiple choice question for engineering

Set 1

1. Which of the following is not a disadvantage to the usage of array?
a) Fixed size
b) You know the size of the array prior to allocation
c) Insertion based on position
d) Accessing elements at specified positions

Answer

Answer: d [Reason:] Array elements can be accessed in two steps. First, multiply the size of the data type with the specified position, second, add this value to the base address. Both of these operations can be done in constant time, hence accessing elements at a given index/position is faster.

2. What is the time complexity of inserting at the end in dynamic arrays?
a) O(1)
b) O(n)
c) O(logn)
d) Either O(1) or O(n)

Answer

Answer: d [Reason:] Depending on whether the array is full or not, the complexity in dynamic array varies. If you try to insert into an array which is not full, then the element is simply stored at the end, this takes O(1) time. If you try to insert into an array which is full, first you will have to allocate an array with double the size of the current array and then copy all the elements into it and finally insert the new element, this takes O(n) time.

3. What is the time complexity to count the number of elements in the linked list?
a) O(1)
b) O(n)
c) O(logn)
d) None of the mentioned

Answer

Answer: b [Reason:] To count the number of elements, you have to traverse through the entire list, hence complexity is O(n).

4. Which of the following performs deletion of the last element in the list? Given below is the Node class.

class Node
{
protected Node next;
protected Object ele;
	Node(Object e,Node n)
{
		ele = e;
		next = n;
}
public void setNext(Node n)
{
		next = n;
}
public void setEle(Object e)
{
		ele = e;
}
public Node getNext()
{
return next;
}
public Object getEle()
{
return ele;
}
}
class SLL 
{
	Node head;
int size;
	SLL()
{
		size = 0;
}
}

a)

public Node removeLast()
{
if(size == 0)
return null;
	Node cur;
	Node temp;
	cur = head;
while(cur.getNext() != null)
{
		 temp = cur;
		 cur = cur.getNext();
        }
	temp.setNext(null);
	size--;
return cur;
}

b)

public void removeLast()
{
if(size == 0)
return null;
	Node cur;
	Node temp;
	cur = head;
while(cur != null)
{
		temp = cur;
		cur = cur.getNext();
        }
	temp.setNext(null);
return cur;
}

c)

public void removeLast()
{
if(size == 0)
	    return null;
	Node cur;
	Node temp;
	cur = head;
while(cur != null)
{
		cur = cur.getNext();
		temp = cur;
	 }
	temp.setNext(null);
return cur;
}

d)

public void removeLast()
{
if(size == 0)
return null;
	Node cur;
	Node temp;
	cur = head;
while(cur.getNext() != null)
{
		cur = cur.getNext();
		temp = cur;
}
	temp.setNext(null);
return cur;
}
Answer

Answer: a [Reason:] Since you have to traverse to the end of the list and delete the last node, you need two reference pointers. ‘cur’ to traverse all the way and find the last node, and ‘temp’ is a trailing pointer to ‘cur’. Once you reach the end of the list, setNext of ‘temp’ to null, ‘cur’ is not being pointed to by any node, and hence it is available for garbage collection.

5. What is the functionality of the following code?

public void function(Node node)
{
if(size == 0)
		head = node;
else
{
		Node temp,cur;
for(cur = head; (temp = cur.getNext())!=null; cur = temp);
		cur.setNext(node);
}
	size++;
}

a) Inserting a node at the beginning of the list
b) Deleting a node at the beginning of the list
c) Inserting a node at the end of the list
d) Deleting a node at the end of the list

Answer

Answer: c [Reason:] The for loop traverses through the list and then inserts a new node as cur.setNext(node);

6. What is the space complexity for deleting a linked list?
a) O(1)
b) O(n)
c) Either O(1) or O(n)
d) O(logn)

Answer

Answer: a [Reason:] You need a temp variable to keep track of current node, hence the space complexity is O(1).

7. How would you delete a node in the singly linked list? The position to be deleted is given.
a)

public void delete(int pos)
{
if(pos < 0)
	pos = 0;
if(pos > size)
	pos = size;
if( size == 0)
return;
if(pos == 0)
	head = head.getNext();
else
{
	    Node temp = head;
	    for(int i=1; i<pos; i++)
            {
		temp = temp.getNext();
            }
	    temp.setNext(temp.getNext().getNext());
}
	    size--;
}

b)

public void delete(int pos)
{
if(pos < 0)
	pos = 0;
if(pos > size)
	pos = size;
if( size == 0)
return;
if(pos == 0)
	head = head.getNext();
else
{
	    Node temp = head;
	    for(int i=1; i<pos; i++)
	    {
		temp = temp.getNext();
	    }
	    temp.setNext(temp.getNext());
}
	    size--;
}

c)

public void delete(int pos)
{
        if(pos < 0)
	pos = 0;
if(pos > size)
	pos = size;
if( size == 0)
return;
if(pos == 0)
	head = head.getNext();
else
{
	    Node temp = head;
	    for(int i=1; i<pos; i++)
	    {
		temp = temp.getNext().getNext();
            }
	    temp.setNext(temp.getNext().getNext());
}
	    size--;
}

d)

public void delete(int pos)
{
        if(pos < 0)
        pos = 0;
        if(pos > size)
        pos = size;
        if( size == 0)
return;
if(pos == 0)
	head = head.getNext();
else
{
	    Node temp = head;
	    for(int i=0; i<pos; i++)
	    {
		temp = temp.getNext();
	    }
	    temp.setNext(temp.getNext().getNext());
}
	size--;
}
Answer

Answer: a [Reason:] Loop through the list to get into position one behind the actual position given. temp.setNext(temp.getNext().getNext()) will delete the specified node.

8. Which of these is an application of linked lists?
a) To implement file systems
b) For separate chaining in hash-tables
c) To implement non-binary trees
d) All of the mentioned

Answer

Answer: d [Reason:] Linked lists can be used to implement all of the above mentioned applications.

9. Which of the following piece of code has the functionality of counting the number of elements in the list?
a)

public int length(Node head)
{
int size = 0;
	Node cur = head;
while(cur!=null)
{
	    size++;
	    cur = cur.getNext();
}
return size;
}

b)

public int length(Node head)
{
        int size = 0;
	Node cur = head;
while(cur!=null)
{
	    cur = cur.getNext();
	    size++;
}
return size;
}

c)

public int length(Node head)
{
int size = 0;
	Node cur = head;
while(cur!=null)
{
	    size++;
	    cur = cur.getNext();
}
}

d)

public int length(Node head)
{
int size = 0;
	Node cur = head;
while(cur!=null)
{
	    size++;
	    cur = cur.getNext().getNext();
}
return size;
}
Answer

Answer: a [Reason:] ‘cur’ pointer traverses through list and increments the size variable until the end of list is reached.

10. How do you insert an element at the beginning of the list?
a)

public void insertBegin(Node node)
{
	node.setNext(head);
	head = node;
	size++;
}

b)

public void insertBegin(Node node)
{
	head = node;
	node.setNext(head);
	size++;
}

c)

public void insertBegin(Node node)
{
	Node temp = head.getNext()
	node.setNext(temp);
	head = node;
	size++;
}

d) None of the mentioned

Answer

Answer: a [Reason:] Set the ‘next’ pointer point to the head of the list and then make this new node as the head.

11. What is the functionality of the following piece of code?

public int function(int data)
{
	Node temp = head;
int var = 0;
while(temp != null)
{
if(temp.getData() == data)
{
return var;
}
		var = var+1;
		temp = temp.getNext();
}
return Integer.MIN_VALUE;
}

a) Find and delete a given element in the list
b) Find and return the given element in the list
c) Find and return the position of the given element in the list
d) Find and insert a new element in the list

Answer

Answer: c [Reason:] When temp is equal to data, the position of data is returned.

Set 2

1. The asynchronous input can be used to set the flip-flop to the
a) 1 state
b) 0 state
c) either 1 or 0 state
d) none of the Mentioned

Answer

Answer: c [Reason:] The asynchronous input can be used to set the flip-flop to the 1 state or clear the flip-flop to the 0 state at any time, regardless of the condition at the other inputs.

2. Input clock of RS flip-flop is given to
a) Input
b) Pulser
c) Output
d) Master slave flip-flop

Answer

Answer: b [Reason:] Pulser behaves like an arithmetic operator.

3. D flip-flop is a circuit having
a) 2 NAND gates
b) 3 NAND gates
c) 4 NAND gates
d) 5 NAND gates

Answer

Answer: c [Reason:] D flip-flop is a circuit having 4 NAND gates. Two of them are connected with each other.

4. In JK flip flop same input, i.e. at a particular time or during a clock pulse, the output will oscillate back and forth between 0 and 1. At the end of the clock pulse the value of output Q is uncertain. The situation is referred to as?
a) Conversion condition
b) Race around condition
c) Lock out state
d) None of the Mentioned

Answer

Answer: b [Reason:] A race around condition is a flaw in an electronic system or process whereby the output and result of the process is unexpectedly dependent on the sequence or timing of other events.

5. Master slave flip flop is also referred to as?
a) Level triggered flip flop
b) Pulse triggered flip flop
c) Edge triggered flip flop
d) None of the Mentioned

Answer

Answer: b [Reason:] The term pulse triggered means the data is entered on the rising edge of the clock pulse, but the output does not reflect the change until the falling edge of clock pulse.

6. In a positive edge triggered JK flip flop, a low J and low K produces?
a) High state
b) Low state
c) Toggle state
d) None of the Mentioned

Answer

Answer: d [Reason:] In JK Flip Flop if J = K = 0 then it holds its current state. There will be no change.

7. If one wants to design a binary counter, preferred type of flip-flop is
a) D type
b) S-R type
c) Latch
d) J-K type

Answer

Answer: d [Reason:] If one wants to design a binary counter, preferred type of flip-flop is J-K type because it has capability to recover from toggle condition.

8. S-R type flip-flop can be converted into D type flip-flop if S is connected to R through
a) OR Gate
b) Inverter
c) AND Gate
d) Full Adder

Answer

Answer: c [Reason:] S-R type flip-flop can be converted into D type flip-flop if S is connected to R through AND gate.

9. Which of the following flip-flops is free from race around problem?
a) T flip-flop
b) SR flip-flop
c) Master-Slave Flip-flop
d) None of the Mentioned

Answer

Answer: a [Reason:] T flip-flop is free from race around condition because its output depends only on the input; hence there is no any problem creates as like toggle.

10. Which of the following is the Universal Flip-flop?
a) S-R flip-flop
b) J-K flip-flop
c) Master slave flip-flop
d) D Flip-flop

Answer

Answer: b [Reason:] There are a lots of flip-flop can be prepared by using J-K flip-flop. So, the name is universal flip-flop.

11. How many types of triggering takes place in a flip flops?
a) 2
b) 3
c) 4
d) 5

Answer

Answer: a [Reason:] There are two types of triggering takes place in a flip-flop, viz., level triggering & edge triggering.

12. Flip-flops are
a) Stable devices
b) Astable devices
c) Bistable devices
d) None of the Mentioned

Answer

Answer: c [Reason:] Flip-flops are synchronous bistable devices known as bistable multivibrators.

13. The term synchronous means
a) The output changes state only when any of the input is triggered
b) The output changes state only when the clock input is triggered
c) The output changes state only when the input is reversed
d) None of the Mentioned

Answer

Answer: b [Reason:] The term synchronous means the output changes state only when the clock input is triggered. That is, changes in the output occur in synchronization with the clock.

14. The S-R, J-K and D inputs are called
a) Asynchronous inputs
b) Synchronous inputs
c) Bidirectional inputs
d) Unidirectional inputs

Answer

Answer: b [Reason:] The S-R, J-K and D inputs are called synchronous inputs because data on these inputs are transferred to the flip-flop’s output only on the triggering edge of the clock pulse.

15. The circuit that generates a spike in response to a momentary change of input signal is called
a) R-C differentiator circuit
b) L-R differentiator circuit
c) R-C integrator circuit
d) L-R integrator circuit

Answer

Answer: a [Reason:] The circuit that generates a spike in response to a momentary change of input signal is called R-C differentiator circuit.

Set 3

1. Heat rate is used to define the efficiency of steam power plant.
a) True
b) False

Answer

Answer: a [Reason:] Heat rate = (Input energy)/(output power).

2. Inverse of efficiency is called as ______
a) steam rate
b) heat rate
c) heat utilized
d) none of the mentioned

Answer

Answer: b [Reason:] From the formula we can identify heat rate is the inverse of steam rate.

3. To increase plant efficiency heat rate is to be _____
a) increased
b) decreased
c) no relation with the heat rate
d) none of the mentioned

Answer

Answer: b [Reason:] As heat rate is inverse of plant efficiency, to increase plant efficiency heat rate is to be decreased.

4. What are the units of heat rate ?
a) Kw/hr
b) No units
c) BTU/KWh
d) None of the mentioned

Answer

Answer: c [Reason:] Chemical energy input units are BTU and electrical energy output units are KWh. So units of heat rate are BTU/KWh.

5. Chemical energy of the fuel can be calclated by _________
a) Chemical energy of fuel = (Total fuel used) * (Higher heating value)
b) Chemical energy of fuel = (Calorific value) * (Fuel required for 1 Kcal of energy)
c) Cannot be determined theoretically
d) None of the mentioned

Answer

Answer: a [Reason:] Chemical energy of fuel = (Total fuel used) * (Higher heating value).

6. Heat rate losses that can be directly effected by actions of operators is called as ______
a) uncontrollable losses
b) controllable losses
c) non-Value added losses
d) none of the mentioned

Answer

Answer: b [Reason:] Heat rate losses than be directly effected by actions of operator are called controllable losses.

7. Heat rate deviation can be defined as _______
a) difference between actual and target heat rate
b) difference between heat rates at maximum and minimum temperatures
c) difference between calorific value of ideal fuel and actual fuel used
d) none of the mentioned

Answer

Answer: a [Reason:] Heat rate deviation can be defined as the difference between the actual and target heat rates.

8. Steam flow rate can be calculated by _______
a) 3600/p
b) 3600 He/p
c) 3600 P/He
d) None of the mentioned

Answer

Answer: c [Reason:] Steam flow rate can be calculated by Ms = 3600 p/He.

9. The rate at which boiler in steam turbine produces steam is called __________
a) Steam rate
b) Steaming rate
c) Heat rate
d) None of the mentioned

Answer

Answer: b [Reason:] The rate at which boiler produces steam is called steaming rate.

10. Heat rate can be used to find annual fuel cost.
a) True
b) False

Answer

Answer: a [Reason:] Annual Fuel cost = Heat rate deviation*Fuel capacity*Capacity factor*(Gross capacity*Auxiliary loads)*Time.

Set 4

1. Dimensional analysis can be used to compare gas turbines.
a) True
b) False

Answer

Answer: a [Reason:] Dimensionless analysis can be used to compare gas turbines.

2. Reynolds number is a __________ parameter.
a) constant
b) have dimension
c) dimensionless constant
d) none of the mentioned

Answer

Answer: c [Reason:] Reynolds number is a dimensionless parameter.

3. Power is expressed in ___________
a) Horsepower
b) Volts
c) Ohms
d) None of the mentioned

Answer

Answer: a [Reason:] Power is expressed in horsepower.

4. Flow coefficient has no _______
a) value
b) dimension
c) flow coefficient is constant
d) none of the mentioned

Answer

Answer: b [Reason:] Flow coefficient has no dimension.

5. Pressure coefficient has ___________
a) no value
b) dimension
c) no dimension
d) none of the mentioned

Answer

Answer: c [Reason:] Pressure when expressed in dimensionless parameter is called as pressure coefficient.

6. ____________ when expressed in the form of dimensionless quantity is known as flow coefficient.
a) Flow rate
b) Pressure
c) Flow rate & Pressure
d) None of the mentioned

Answer

Answer: a [Reason:] Flow coefficient is a dimensionless quantity.

7. Mach number is a _________ parameter.
a) valued
b) dimensionless
c) valued & dimensionless
d) none of the mentioned

Answer

Answer: b [Reason:] Mach number is a dimensionless parameter.

8. Gas constants are classified under ________ dimension groups.
a) quasi
b) uni
c) multiple
d) none of the mentioned

Answer

Answer:a [Reason:] Gas constants are classified under quasi dimension groups.

9. Corrected groups are __________ proportional to quasi dimension groups.
a) inversely
b) directly
c) not related
d) none of the mentioned

Answer

Answer: b [Reason:] Corrected groups are directly proportional to quasi dimensional groups.

10. Working fluid properties are present in scaling parameter groups.
a) True
b) False

Answer

Answer: b [Reason:] Working fluid properties are not present in scaling parameter groups.

Set 5

1. Regenerator is also called as ___________
a) Intercooler
b) Reheater
c) Recuperator
d) None of the mentioned

Answer

Answer: c [Reason:] Regenerator is also called as recuperator.

2. When recuperator is used thermal efficiency is ______
a) decreased
b) increased
c) doesn’t change
d) none of the mentioned

Answer

Answer: b [Reason:] When regenerator is used thermal efficiency is increased.

3. Inlet temperature of regenerator is __________
a) same as of the inlet exhausted gases
b) more than the inlet exhausted gases
c) less than the inlet exhaust gases
d) none of the mentioned

Answer

Answer: a [Reason:] Inlet temperature of regenerator is same as of inlet exhaust gases.

4. Effectiveness can be defined as _________
a) none of the mentioned
b) inverse of the efficiency
c) ratio of heat rate to the mass entering
d) ratio of Actual heat transferred to the maximum heat transferred

Answer

Answer: d [Reason:] Effectiveness is the ratio of actual heat transferred to maximum heat that can be transferred.

5. Generally effectiveness of regenerators are ___________
a) 0.95
b) 0.66
c) 0.77
d) 0.85

Answer

Answer: d [Reason:] Generally effectiveness is 0.85 for a regenerator.

6. Compression can be taken place by _____________
a) isoentropic compression
b) isothermal compresion
c) two stage compression process
d) all of the mentioned

Answer

Answer: d [Reason:] Compression can be taken place by isoentropic compression or isothermal compression or by two stage compression.

7. Isoentropic compression requires maximum work.
a) True
b) False

Answer

Answer: a [Reason:] Isoentropic compression requires maximum work.

8. Isothermal compression requires minimum work.
a) True
b) False

Answer

Answer: a [Reason:] Isothermal compression requires minimum work.

9. By two stage compression work output from turbine is _______
a) decreased
b) increased
c) remains constant
d) none

Answer

Answer: b [Reason:] Two stage compression increases work output from turbine.

10. When equal pressure ratio are maintained at two stages the work output _______
a) increases
b) decreases
c) optimum
d) none of the mentioned

Answer

Answer: a [Reason:] When equal pressure ratio is maintained work output increases.

ed010d383e1f191bdb025d5985cc03fc?s=120&d=mm&r=g

DistPub Team

Distance Publisher (DistPub.com) provide project writing help from year 2007 and provide writing and editing help to hundreds student every year.