DSA All Collection

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1279

3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

Data Structure MCQ


1) How can we describe an array in the best possible way?

a. The Array shows a hierarchical structure.

b. Arrays are immutable.

c. Container that stores the elements of similar types

d. The Array is not a data structure

Hide Answer Workspace

Answer: c

Explanation: The answer is c because array stores the elements in a


contiguous block of memory of similar types. Therefore, we can say
that array is a container that stores the elements of similar types.

2) Which of the following is the correct way of declaring an array?

a. int javatpoint[10];

b. int javatpoint;

c. javatpoint{20};

d. array javatpoint[10];

Hide Answer Workspace

Answer: a

Explanation: The answer is a because int specifies the type of the


array, javatpoint is the name of the array, and 10 is the size of the
array enclosed within the square brackets.

3) How can we initialize an array in C language?

https://www.javatpoint.com/data-structure-mcq 1/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

a. int arr[2]=(10, 20)

b. int arr(2)={10, 20}

c. int arr[2] = {10, 20}

d. int arr(2) = (10, 20)

Hide Answer Workspace

Answer: c

Explanation: The answer is c because the values assigned to the array


must be enclosed within a curly bracket.

4) Which of the following is the advantage of the array data structure?

a. Elements of mixed data types can be stored.

b. Easier to access the elements in an array

c. Index of the first element starts from 1.

d. Elements of an array cannot be sorted

Hide Answer Workspace

Answer: b

Explanation: The answer is b because the elements in an array are


stored in a contiguous block of memory, so it is easier to access the
elements of an array through indexing.

5) Which of the following highly uses the concept of an array?

a. Binary Search tree

b. Caching

c. Spatial locality
https://www.javatpoint.com/data-structure-mcq 2/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

d. Scheduling of Processes

Hide Answer Workspace

Answer: c

Explanation: The answer is c, i.e., Spatial locality. Here, spatial locality


means that the instruction accessed recently, then the nearby memory
location would be accessed in the next iteration. As we know that in an
array, all the elements are stored in a contiguous block of memory, so
spatial locality is accessed quickly.

6) Which of the following is the disadvantage of the array?

a. Stack and Queue data structures can be implemented through an


array.

b. Index of the first element in an array can be negative

c. Wastage of memory if the elements inserted in an array are lesser


than the allocated size

d. Elements can be accessed sequentially.

Hide Answer Workspace

Answer: c

Explanation: The answer is c. For example, if we have an array of size


10 elements and we have inserted only 5 elements in an array then
there is a wastage of 5 memory blocks which cannot be utilized by
another variable.

7) What is the output of the below code?

#include <stdio.h>

int main()

int arr[5]={10,20,30,40,50};

printf("%d", arr[5]);

return 0;

a. Garbage value

b. 10

c. 50

https://www.javatpoint.com/data-structure-mcq 3/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

d. None of the above

Hide Answer Workspace

Answer: a

Explanation: The answer is a because the indexing in an array starts


from 0, so it starts from arr[0] to arr[4]. If we try to access arr[5] then
the garbage value will be printed.

8) Which one of the following is the size of int arr[9] assuming that int
is of 4 bytes?

a. 9

b. 36

c. 35

d. None of the above

Hide Answer Workspace

Answer: b

Explanation: The answer is b because the size of int type data is 4


bytes. The array stores 9 elements, so the size of the array is 9*4=36
bytes.

9) Which one of the following is the process of inserting an element in


the stack?

a. Insert

b. Add

c. Push

d. None of the above

Hide Answer Workspace

Answer: c

Explanation: The answer is c. In stack, the process of inserting an


element is known as a push operation.

10) When the user tries to delete the element from the empty stack
then the condition is said to be a ____

https://www.javatpoint.com/data-structure-mcq 4/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

a. Underflow

b. Garbage collection

c. Overflow

d. None of the above

Hide Answer Workspace

Answer: a

Explanation: The answer is a. Underflow is a condition that occurs


when user tries to implement the pop operation in the empty stack.

11) If the size of the stack is 10 and we try to add the 11th element in
the stack then the condition is known as___

a. Underflow

b. Garbage collection

c. Overflow

d. None of the above

Hide Answer Workspace

Answer: c

Explanation: The answer is c because the stack is full with its 10


elements, and inserting one more element in a stack will lead to the
stack overflow.

12) Which one of the following is not the application of the stack data
structure

a. String reversal

b. Recursion

c. Backtracking

d. Asynchronous data transfer

Hide Answer Workspace

Answer: d

Explanation: The answer is d. The first three options are the stack
applications, but option d is not a stack application. The queue data
structure is used for synchronization between the processes.

https://www.javatpoint.com/data-structure-mcq 5/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

13) Which data structure is mainly used for implementing the recursive
algorithm?

a. Queue

b. Stack

c. Binary tree

d. Linked list

Hide Answer Workspace

Answer: b

Explanation: The answer is b. Recursion means calling the function


itself again. Stack is used to maintain the previous records of the
function.

14) Which data structure is required to convert the infix to prefix


notation?

a. Stack

b. Linked list

c. Binary tree

d. Queue

Hide Answer Workspace

Answer: a

Explanation: The answer is a, i.e., stack. Stack is a data structure


used to reverse the order of the operators in the expression. It is also
used as a storage structure that stores all the operators and print all
the operators when all the operands have appeared.

15) Which of the following is the infix expression?

a. A+B*C

b. +A*BC

c. ABC+*

d. None of the above

Hide Answer Workspace

Answer: a

https://www.javatpoint.com/data-structure-mcq 6/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

Explanation: The answer is a, i.e., A+B*C because, in infix notation,


all the operators appear between the operands.

16) Which of the following is the prefix form of A+B*C?

a. A+(BC*)

b. +AB*C

c. ABC+*

d. +A*BC

Hide Answer Workspace

Answer: d

Explanation: The answer is d. The prefix notation means all the


operators that appear before operand.

To convert the infix expression into a prefix expression, we will move


the operator to the left of the parenthesis as shown in the below figure.

17) Which of the following is not the correct statement for a stack data
structure?

a. Arrays can be used to implement the stack

b. Stack follows FIFO

c. Elements are stored in a sequential manner

d. Top of the stack contains the last inserted element

Hide Answer Workspace

Answer: b

Explanation: The answer is b because Stack does not follow FIFO. It


follows LIFO.

18) If the elements '1', '2', '3' and '4' are added in a stack, so what
would be the order for the removal?

a. 1234

b. 2134

c. 4321

d. None of the above

Hide Answer Workspace


https://www.javatpoint.com/data-structure-mcq 7/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

Answer: c

Explanation: The answer is c because stack follows LIFO, which means


that the element inserted at the last will be removed first.

19) What is the outcome of the prefix expression +, -, *, 3, 2, /, 8, 4,


1?

a. 12

b. 11

c. 5

d. 4

Hide Answer Workspace

Answer: c

Explanation: Reverse of the prefix expression: 1, 4, 8, /, 2, 3, *, -, +

Reading of Top of the Stack representation


prefix stack

1 1

4 4

https://www.javatpoint.com/data-structure-mcq 8/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

8 8

/ (8/4)

2 2

https://www.javatpoint.com/data-structure-mcq 9/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

3 3

* (2*3)

- (2*3) - (8/4)

+ (2*3) - (8/4)
+1

https://www.javatpoint.com/data-structure-mcq 10/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

The infix expression of the above prefix expression is:

(2*3) - (8/4) +1

6 -2 +1 = 5

20) The minimum number of stacks required to implement a stack is


__

a. 1

b. 3

c. 2

d. 5

Hide Answer Workspace

Answer: c

Explanation: The answer is 2. In Queue, one stack is required for the


enqueue operation, and another stack will be used for the dequeue
operation. The first stack is considered as the input stack whereas the
second stack is considered as the output stack.

21) Which one of the following node is considered the top of the stack
if the stack is implemented using the linked list?

a. First node

b. Second node

c. Last node

d. None of the above

Hide Answer Workspace

Answer: a

Explanation: The answer is a, i.e., First node. As we know, that last


inserted element in the stack is considered as the top of the stack.
Whenever the element is added to the linked list, it is always added at
the beginning of the list. Therefore, we can say that the first node in
the linked list is considered as the top of the stack.

22) Consider the following stack implemented using stack.

#define SIZE 11

struct STACK

https://www.javatpoint.com/data-structure-mcq 11/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

int arr[SIZE];

int top=-1;

What would be the maximum value of the top that does not cause the
overflow of the stack?

a. 8

b. 9

c. 11

d. 10

Hide Answer Workspace

Answer: d

Explanation: The answer is 10. The maximum size of the array is 11;
therefore, we can insert 11 elements in the stack. The top value is
initialized by -1, and on every insertion, the top value gets
incremented.

23) What is another name for the circular queue among the following
options?

a. Square buffer

b. Rectangle buffer

c. Ring buffer

d. None of the above

Hide Answer Workspace

Answer: c

Explanation: The circular queue is also known as a ring buffer. In a


circular queue, the last element is connected back to the first element
of the queue that forms a circle. Therefore, the structure of a circular
queue is also known as a ring structure.

24) If the elements '1', '2', '3' and '4' are inserted in a queue, what
would be order for the removal?

a. 1234

b. 4321

https://www.javatpoint.com/data-structure-mcq 12/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

c. 3241

d. None of the above

Hide Answer Workspace

Answer: a

Explanation: The answer is a, i.e., 1234. The queue follows the FIFO
principle in which the element inserted first will be removed first.

25) A list of elements in which enqueue operation takes place from one
end, and dequeue operation takes place from one end is__

a. Binary tree

b. Stack

c. Queue

d. Linked list

Hide Answer Workspace

Answer: c

Explanation: The answer is Queue. Queue is a data structure in which


insertion takes place from one end, and deletion takes place from one
end.

26) Which of the following principle does Queue use?

a. LIFO principle

b. FIFO principle

c. Linear tree

d. Ordered array

Hide Answer Workspace

Answer: b

Explanation: The answer is FIFO principle. Here, FIFO stands for First-
In-First-Out. It means that the element which is inserted first will also
be removed first.

27) Which one of the following is not the type of the Queue?

a. Linear Queue ⇧

https://www.javatpoint.com/data-structure-mcq 13/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

b. Circular Queue

c. Double ended Queue

d. Single ended Queue

Hide Answer Workspace

Answer: d

Explanation: The answer is d. i.e., single ended queue. Queue has two
ends in which one end is used for the insertion and another end is used
for the deletion. Therefore, it is not possible for the Queue to have a
single ended queue.

28) Which one of the following is the overflow condition if linear queue
is implemented using an array with a size MAX_SIZE?

a. rear = front

b. rear = front+1

c. rear=MAX_SIZE -1

d. rear = MAX_SIZE

Hide Answer Workspace

Answer: c

Explanation: The answer is c, i.e., rear=MAX_SIZE-1. As the size of


the array is MAX_SIZE, so we can insert the elements till MAX_SIZE-1.
If we try to insert the elements of size MAX_SIZE or more than
MAX_SIZE in a queue, then it leads to the overflow condition.

29) Which one of the following is the overflow condition if a circular


queue is implemented using array having size MAX?

a. rear= MAX-1

b. rear=MAX

c. front=(rear+1) mod max

d. None of the above

Hide Answer Workspace

Answer: c

Explanation: The answer is c, i.e., front=(rear+1) mod max. The


overflow condition for the linear queue is rear =MAX-1 as there is no

space left in the Queue if rear = MAX-1. On the other hand, in a circular
https://www.javatpoint.com/data-structure-mcq 14/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

queue, the overflow condition is front=(rear+1) mod max because the


last element is connected to the first element in a circular queue.

30) The time complexity of enqueue operation in Queue is __

a. O(1)

b. O(n)

c. O(logn)

d. O(nlogn)

Hide Answer Workspace

Answer: a

Explanation: The answer is a, i.e., O(1). In Queue, the insertion is


performed at the rear end, which is directly accessible; therefore, it
takes O(1) time to insert an element in a Queue.

31) Which of the following that determines the need for the Circular
Queue?

a. Avoid wastage of memory

b. Access the Queue using priority

c. Follows the FIFO principle

d. None of the above

Hide Answer Workspace

Answer: a

Explanation: The answer is a, i.e., Avoid wastage of memory. In a


linear queue, there are chances of wastage of memory because if the
rear is pointing to the last element whereas the front is pointing to the
element other than the first element; it means that spaces allocated
before the front are free, but it cannot be reused as rear cannot be
incremented. In contrast, the last element is connected to the first
element in a circular queue; if initial spaces are vacant, then rear can
be incremented by using the statement (rear+1) mod max where max
is the size of the array. Therefore, we conclude that the circular queue
avoids wastage of memory.

32) Which one of the following is the correct way to increment the rear
end in a circular queue?

https://www.javatpoint.com/data-structure-mcq 15/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

a. rear =rear+1

b. (rear+1) % max

c. (rear % max) + 1

d. None of the above

Hide Answer Workspace

Answer: b

Explanation: The answer is b. It ensures that the rear will have the
value from 0 to max-1; if the rear end points to the last position, and
we increment the rear end using (rear+1) % max, then rear will point
to the first position in the queue.

33) Consider the following code.

int fun()

if(isEmpty())

return -10;

else

int n;

n= q[front];

front++;

return n;

Which operation does the above code perform?

a. Enqueue

b. Dequeue

c. Return the front element

d. Both b and c

Hide Answer Workspace

Answer: d

https://www.javatpoint.com/data-structure-mcq 16/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

Explanation: The answer is d because two operations are performed in


the above code. The first one is returning the value of the front with the
help of the statement n=q[front], and the second operation is dequeue
(deleting an element) by using the statement front++.

34) In the linked list implementation of queue, where will the new
element be inserted?

a. At the middle position of the linked list

b. At the head position of the linked list

c. At the tail position of the linked list

d. None of the above

Hide Answer Workspace

Answer: c

Explanation: The answer is c. If the queue is implemented using


linked list, then the new element will be inserted at the tail position of
the linked list as Queue follows FIFO principle in which new element will
always be added at the end of the Queue.

35) How many Queues are required to implement a Stack?

a. 3

b. 2

c. 1

d. 4

Hide Answer Workspace

Answer: b

Explanation: The answer is b because one queue is required to


perform the push operation while the other queue is used to perform
the pop operation.

36) Which one of the following is not the application of the Queue data
structure?

a. Resource shared between various systems

b. Data is transferred asynchronously

c. Load balancing

https://www.javatpoint.com/data-structure-mcq 17/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

d. Balancing of symbols

Hide Answer Workspace

Answer: d

Explanation:

The answer is d. The options a, b, and c are the applications of the


Queue data structure while option d, i.e., balancing of symbols is not
the application of the Queue data structure. The option a, i.e., resource
shared between various system is the application of the Queue data
structure as it allows to align all the requests for the resource in a
queue. The option b, i.e., data is transferred asynchronously is a
application of the Queue data structure. Here asynchronously means
that the data received at the different rate as sent.

The option c, i.e., load balancing is also an application of the Queue


data structure because all the requests from the client are stored in the
Queue, and it distributes the requests to the client one by one.

The option d, i.e., balancing of symbols is an application of the stack


data structure.

37) Which of the following option is true if implementation of Queue is


from the linked list?

a. In enqueue operation, new nodes are inserted from the beginning and
in dequeue operation, nodes are removed from the end.

b. In enqueue operation, new nodes are inserted from the end and in
dequeue operation, nodes are deleted from the beginning.

c. In enqueue operation, new nodes are inserted from the end and in
dequeue operation, nodes are deleted from the end.

d. Both a and b

Hide Answer Workspace

Answer: d

Explanation: The answer is d. As we know that Queue has two ends,


i.e., one for the insertion and another one for the deletion. If Queue is
implemented using Linked list then it can be done in either of the ways.

38) The necessary condition to be checked before deletion from the


Queue is__

a. Overflow

https://www.javatpoint.com/data-structure-mcq 18/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

b. Underflow

c. Rear value

d. Front value

Hide Answer Workspace

Answer: b

Explanation: The answer is b, i.e., Underflow. Before deleting an


element from the Queue, we first need to check whether the Queue is
empty or not.

39) Which data structure is the best for implementing a priority queue?

a. Stack

b. Linked list

c. Array

d. Heap

Hide Answer Workspace

Answer: d

Explanation: The answer is d, i.e., Heap. All the data structures that
are given in the above options can be used to implement a priority
queue but the most efficient way of implementing a priority queue is
heap data structure.

40) Which of the following principle is used if two elements in the


priority queue have the same priority?

a. LIFO

b. FIFO

c. Linear tree

d. None of the above

Hide Answer Workspace

Answer: b

Explanation: The answer is b, i.e., FIFO. In a priority queue, if two or


more elements have the same priority then they are arranged based on
the FIFO principle.

https://www.javatpoint.com/data-structure-mcq 19/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

41) Which of the following statement is not true regarding the priority
queue?

a. Processes with different priority can be easily handled

b. Easy to implement

c. Deletion is easier

d. None of the above

Hide Answer Workspace

Answer: c

Explanation: The answer is c. i.e., deletion is easier. In worst case, the


deletion is not easier as we have to traverse to the n elements until the
element to be removed is not found.

42) A linear data structure in which insertion and deletion operations


can be performed from both the ends is___

a. Queue

b. Deque

c. Priority queue

d. Circular queue

Hide Answer Workspace

Answer: b

Explanation: The answer is b, i.e., Deque. The deque is a data


structure in which both insertion and deletion can be performed from
both the ends whereas, in Queue, insertion can be done from one end
and deletion can be performed from another end.

43) In the Deque implementation using singly linked list, what would
be the time complexity of deleting an element from the rear end?

a. O(1)

b. O(n2)

c. O(n)

d. O(nlogn)

Hide Answer Workspace

Answer: O(n) ⇧

https://www.javatpoint.com/data-structure-mcq 20/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

Explanation: The answer is O(n) because we need to traverse till the n


element to delete the element from the rear end.

44) Which of the following data structure allows you to insert the
elements from both the ends while deletion from only one end?

a. Input-restricted queue

b. Output-restricted queue

c. Priority queue

d. None of the above

Hide Answer Workspace

Answer: b

Explanation: The answer is b. The output-restricted queue is one of


the types of the Deque data structure in which insertion is allowed from
both the ends but the deletion is allowed from only one end.

45) What would be the output after performing the following operations
in a Deque?

Insertfront(10);

Insertfront(20);

Insertrear(30);

Insertrear(40);

Deletefront();

Insertfront(50);

Deleterear();

Display();

a. 10, 20, 30

b. 50, 10, 30

c. 40, 20, 30

d. None of the above

Hide Answer Workspace

Answer: b

Explanation:

The answer is b.

Let's dry run the above code.
https://www.javatpoint.com/data-structure-mcq 21/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

When insertfront(10) is called, deque would be:

10

When insertfront(20) is called, the deque would be:

20 10

When insertrear(30) is called, the deque would be:

20 10 30

When insertrear(40) is called, the deque would be:

20 10 30 40

When deletefront() is called, the deque would be:

10 30 40

When insertfront(50) is called, the deque would be:

50 10 30 40

When deleterear() is called, the deque would be:

50 10 30

46) In a circular queue implementation using array of size 5, the array


index starts with 0 where front and rear values are 3 and 4
respectively. Determine the array index at which the insertion of the
next element will take place.

a. 5

b. 0

c. 1

d. 2

Hide Answer Workspace

Answer: b

Explanation: The answer is b, i.e., 0. As it is mentioned in the


question that the size of the array is 5; therefore, the range would be
from 0 to 4. In a circular queue, the last element is connected to the
first element; the value of rear is 4 so when we increment the value

then it will point to the 0th position of the array.

47) If circular queue is implemented using array having size MAX_SIZE


in which array index starts with 0, front points to the first element in
the queue, and rear points to the last element in the queue. Which one

https://www.javatpoint.com/data-structure-mcq 22/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

of the following conditions used to specify that the circular queue is


empty?

a. Front=rear= -1

b. Front=rear=0

c. Front=rear+1

d. None of the above

Hide Answer Workspace

Answer: a

Explanation: The answer is a, i.e., front=rear= -1. When the circular


queue is empty means that no element is available in the queue then
the front and rear are initialized with a -1 value.

48) Consider the implementation of the singly linked list having the
head pointer only in the representation. Which of the following
operations can be performed in O(1) time?

i) Deletion of the last node in the linked list


ii) Insertion at the front of the linked list
iii) Deletion of the first node in the linked list
iv) Insertion at the end of the linked list

a. ii

b. both ii and iii

c. both i and iv

d. both i and ii

Hide Answer Workspace

Answer: b

Explanation: The answer is b. As it is mentioned in the above question


that there is only head pointer pointing to the front node in the list so it
will take O(1) time to insert at the front as well as to delete the first
node from the list. If we try to insert the node at the end or delete the
last node then it will take O(n) time as we need to traverse till the n
elements.

49) What would be the time complexity if user tries to insert the
element at the end of the linked list (head pointer is known)?

a. O(1)

b. O(n)
https://www.javatpoint.com/data-structure-mcq 23/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

c. O(logn)

d. O(nlogn)

Hide Answer Workspace

Answer: b

Explanation: The answer is b, i.e., O(n). As it is mentioned in the


above question that head pointer is known, so to insert the node at the
end of the linked list; we have to traverse till the nth node. Therefore,
the time complexity would be O(n).

50) Which of the following is the time complexity to search an element


in the linked list?

a. O(1)

b. O(n)

c. O(logn)

d. O(nlogn)

Hide Answer Workspace

Answer: O(n)

Explanation: The answer is O(n). The worst-case time complexity to


search an element in the linked list is O(n) because if we have to find
the last element then we need to traverse till the nth node.

51) Consider the following code

struct node

int data;

struct node *next;

node ptr;

Which one of the following is the correct option to create a new node?

a. ptr= (node*)malloc(sizeof(node*))

b. ptr=(node)malloc(sizeof(node))

c. ptr=(node*)malloc(sizeof(node))

d. None of the above


https://www.javatpoint.com/data-structure-mcq 24/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

Hide Answer Workspace

Answer: c

Explanation: The answer is c, i.e., ptr=(node*)malloc(sizeof(node)).


In this statement, we have used a malloc() function for allocating the
memory to the node and ptr is a pointer variable that will point to the
newly created node.

52) Which of the following statement is not true about the doubly
linked list?

a. We can traverse in both the directions.

b. It requires extra space

c. Implementation of doubly linked list is easier than the singly linked


list

d. It stores the addresses of the next and the previous node

Hide Answer Workspace

Answer: c

Explanation: The answer is c. The implementation of doubly linked list


is complex as compared to singly linked list as it needs to store the
addresses of the two nodes, i.e., the previous and the next node. If we
insert or delete the node from the doubly linked list then it needs to
adjust two pointers, previous and the next pointer.

53) What is the maximum number of children that a node can have in
a binary tree?

a. 3

b. 1

c. 4

d. 2

Hide Answer Workspace

Answer: d

Explanation: The answer is d. The binary tree can contain utmost two
children.

https://www.javatpoint.com/data-structure-mcq 25/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

54) Which one of the following techniques is not used in the Binary
tree?

a. Randomized traversal

b. Preorder traversal

c. Postorder traversal

d. Inorder traversal

Hide Answer Workspace

Answer: a

Explanation: The answer is a. The binary tree contains three traversal


techniques, preorder, postorder and inorder traversal.

55) Which of the following options is not true about the Binary Search
tree?

a. The value of the left child should be less than the root node

b. The value of the right child should be greater than the root node.

c. The left and right sub trees should also be a binary search tree

d. None of the above

Hide Answer Workspace

Answer: d

Explanation: The answer is d. All the three options, i.e., a, b and c are
true for the binary search tree. In binary search tree, the left child
should be less than the root node and the right child should be greater
than the value of the root node.

56) How can we define a AVL tree?

a. A tree which is binary search tree and height balanced tree.

b. A tree which is a binary search tree but unbalanced tree.

c. A tree with utmost two children

d. A tree with utmost three children

Hide Answer Workspace

Answer: a

Explanation: The answer is a. An AVL tree is a binary search tree and



height balanced tree.
https://www.javatpoint.com/data-structure-mcq 26/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

57) Why do we prefer Red Black tree over AVL tree?

a. Red Black trees are not strictly balanced

b. Red black tree requires lesser rotations than AVL tree.

c. AVL tree needs more space to store the balance factor.

d. Both b and c

Hide Answer Workspace

Answer: d

Explanation: The answer is d. Red Black tree requires fewer rotations


for inserting or deleting the node whereas AVL tree requires multiple
rotations to balance the tree. AVL tree stores balance factor per node
that requires space whereas Red Black tree stores 1-bit information.

58) Which of the following satisfies the property of the Red Black tree?

a. A tree which is a binary search tree but not strictly balanced tree.

b. A node must be either Red or Black in color and root node must be
black.

c. A tree with maximum three children

d. Both a and b

Hide Answer Workspace

Answer: d

Explanation: The answer is d. Red black tree is a binary search tree


but it is not a strictly balanced tree like AVL tree. In Red Black tree, a
node must be either in Black or Red in color and root node must be in
Black color.

59) What would be the color of newly created node while inserting a
new element in a Red black tree?

a. Black, if the new node is not a root node

b. Red, if the new node is not a root node

c. Black, if the new node is a root node

d. Both b and c

Hide Answer Workspace


https://www.javatpoint.com/data-structure-mcq 27/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

Answer: d

Explanation: The answer is d. The property of Red Black tree is that if


the newly created node is a root node then the color of the node would
be Black otherwise the color of the node would be Red.

60) Identify the AVL tree among the following options?

a. A

b. C

c. Both A and C

d. B

https://www.javatpoint.com/data-structure-mcq 28/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

Hide Answer Workspace

Answer: c

Explanation: The answer is c. Both A and C are the AVL trees but B is
not a AVL tree. As we know that balance factor of every node in AVL
tree should be either -1, 0 or 1. But in case of B, the balance factor of
node 80 is 2, so it is not a AVL tree.

← Prev Next →

For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

Learn Latest Tutorials

SoapUI RPA Manual T.

Cucumber Appium PostgreSQL


Solr MongoDB Gimp

https://www.javatpoint.com/data-structure-mcq 29/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

Verilog Teradata PhoneGap

Preparation

Aptitude Logical Verbal Ability


Reasoning
Aptitude Verbal A.
Reasoning

Interview Company
Questions Interview
Questions
Interview
Company

Trending Technologies

Artificial AWS Tutorial Selenium


Intelligence tutorial
Tutorial AWS
Selenium
AI

Cloud tutorial Hadoop ReactJS


tutorial Tutorial
Cloud
Hadoop ReactJS

Data Science Angular 7 Blockchain


Tutorial Tutorial Tutorial

D. Science Angular 7 Blockchain

Git Tutorial Machine DevOps


Learning Tutorial Tutorial
Git
ML DevOps

B.Tech / MCA

DBMS tutorial

DBMS
https://www.javatpoint.com/data-structure-mcq 30/31
3/23/2021 Data Structure MCQ (Multiple Choice Questions) - javatpoint

Data DAA tutorial


Structures
tutorial DAA

DS

Operating Computer Compiler


System tutorial Network tutorial Design tutorial

OS C. Network Compiler D.

Computer Discrete Ethical


Organization and Mathematics Hacking Tutorial
Architecture Tutorial
E. Hacking
COA D. Math.

Computer Software html tutorial


Graphics Tutorial Engineering
Tutorial Web Tech.
C. Graphics
Software E.

Cyber Automata C Language


Security tutorial Tutorial tutorial

Cyber Sec. Automata C

C++ tutorial Java tutorial .Net


Framework
C++ Java tutorial

.Net

Python tutorial List of Control


Programs Systems tutorial
Python
Programs Control S.

Data Mining
Tutorial

Data Mining

https://www.javatpoint.com/data-structure-mcq 31/31
3/23/2021 Data Structures Algorithms Online Quiz - Tutorialspoint

Data Structures Algorithms Online Quiz

Following quiz provides Multiple Choice Questions (MCQs) related to Data Structures
Algorithms. You will have to read all the given answers and click over the correct answer. If you
are not sure about the answer then you can check the answer using Show Answer button. You
can use Next Quiz button to check new set of questions in the quiz.

Q 1 - A complete graph can have

A - n2 spanning trees

B - nn - 2 spanning trees

C - nn + 1 spanning trees

D - nn spanning trees

Answer : B

Explanation

At maximum, a complete graph can have nn - 1 spanning trees.

Hide Answer

Q 2 - Stack is used for

A - CPU Resource Allocation

https://www.tutorialspoint.com/data_structures_algorithms/data_structures_algorithms_online_quiz.htm 1/4
3/23/2021 Data Structures Algorithms Online Quiz - Tutorialspoint

B - Breadth First Traversal

C - Recursion

D - None of the above

Answer : C

Explanation

Recursive procedures use stacks to execute the result of last executed procedural call.

Show Answer

Q 3 - The following formular is of

left_subtree (keys) ≤ node (key) ≤ right_subtree (keys)

A - Bianry Tree

B - Complete Binary Tree

C - Binary Search Tree

D - All of the above

Show Answer

Q 4 - What could be the worst case height of an AVL tree?

A - 0.97 log n

B - 2.13 log n

C - 1.44 log n

D - n2 log n

Show Answer

https://www.tutorialspoint.com/data_structures_algorithms/data_structures_algorithms_online_quiz.htm 2/4
3/23/2021 Data Structures Algorithms Online Quiz - Tutorialspoint

Q 5 - After each iteration in bubble sort

A - at least one element is at its sorted position.

B - one less comparison is made in the next iteration.

C - Both A & B are true.

D - Neither A or B are true.

Show Answer

Q 6 - How many swaps are required to sort the given array using bubble sort - { 2, 5, 1,
3, 4}

A-4

B-5

C-6

D-7

Show Answer

Q 7 - Which of these alogrithmic approach tries to achieve localized optimum solution −

A - Greedy approach

B - Divide and conquer approach

C - Dynamic approach

D - All of the above

Show Answer

Q 8 - Which of the following algorithm cannot be desiged without recursion −

A - Tower of Hanoi

B - Fibonacci Series

https://www.tutorialspoint.com/data_structures_algorithms/data_structures_algorithms_online_quiz.htm 3/4
3/23/2021 Data Structures Algorithms Online Quiz - Tutorialspoint

C - Tree Traversal

D - None of the above

Show Answer

Q 9 - If locality is a concern, you can use _______ to traverse the graph.

A - Breadth First Search

B - Depth First Search

C - Either BFS or DFS

D - None of the above!

Hide Answer

Q 10 - The worst case complexity of binary search matches with −

A - interpolation search

B - linear search

C - merge sort

D - none of the above

Hide Answer

New Quiz

https://www.tutorialspoint.com/data_structures_algorithms/data_structures_algorithms_online_quiz.htm 4/4
Data Structure Multiple Choice Questions & Answers Pdf

Question: 1

A data structure in which linear sequence is maintained by


pointers is known as

(A) Array

(B) Stack

(C) Linked list

(D) Pointer-based data structure

Ans: C

Linked list

Question: 2

Which of the following data structure works on the principle of


First Come First Serve?

(A) Priority queue

(B) Heap

(C) Stack

(D) Queue

Ans: D

Queue
Question: 3

A ____ is a linear collection of self-referential structures, called


nodes, connected by pointer links.

(A) Queue

(B) Linked list

(C) Tree

(D) Stack

Ans: B

Linked list

Question: 4

A queue where all elements have equal priority is a

(A) ILFO data structure

(B) LILO data structure

(C) FIFO data structure

(D) LIFO data structure

Ans: C

FIFO data structure

Question: 5

A file that is only read by a program is known as ____


(A) Input file

(B) Temporary file

(C) Work file

(D) Input/output file

Ans: A

Input file
Data Structure Objective Questions & Answers Pdf

Question: 1

Which of the following sorting algorithm is the slowest?

(A) Bubble sort

(B) Heap sort

(C) Shell sort

(D) Quick sort

Ans: A

Bubble sort

Question: 2

Which of the following data structure can be used to represent


many-to-many relation?

(A) B-tree

(B) Binary tree

(C) Graph

(D) All of above

Ans: C

Graph

Question: 3
Which of the following statement is not true about linked lists?

(A) Element in a linked list, if it is sorted, can be quickly searched


by applying binary search technique

(B) Elements are not necessarily stored in contiguous locations

(C) Insertions and deletions can be performed efficiently as


compared to arrays

(D) Linked list is a dynamic structure

Ans: A

Element in a linked list, if it is sorted, can be quickly searched by


applying binary search technique

Question: 4

Which of the following is not a linear data structure?

(A) Stack

(B) Queue

(C) Linked list

(D) Binary tree

Ans: D

Binary tree

Question: 5
Which of the following data structure permits insertion and
deletion operations only on one end of the structure?

(A) Linked list

(B) Array

(C) Stack

(D) Queue

Ans: C

Stack
Data Structure Questions & Answers Pdf

Question: 1

Which of the following data structure is more appropriate to


represent a heap?

(A) Two-dimensional array

(B) Doubly linked list

(C) Linear Array

(D) Linked list

Ans: C

Linear Array

Question: 2

Minimum number of fields in each node of a doubly linked list is


____

(A) 2

(B) 3

(C) 4

(D) None of the above

Ans: B

3
Question: 3

A graph in which all vertices have equal degree is known as ____

(A) Complete graph

(B) Regular graph

(C) Multi graph

(D) Simple graph

Ans: A

Complete graph

Question: 4

A vertex of in-degree zero in a directed graph is called a/an

(A) Root vertex

(B) Isolated vertex

(C) Sink

(D) Articulation point

Ans: C

Sink

Question: 5

A graph is a tree if and only if graph is

(A) Directed graph


(B) Contains no cycles

(C) Planar

(D) Completely connected

Ans: B

Contains no cycles
Data Structure Quiz Questions & Answers Pdf

Question: 1

A data structure in which linear sequence is maintained by


pointers is known as

Linked list

Question: 2

Which of the following data structure works on the principle of


First Come First Serve?

Queue

Question: 3

A ____ is a linear collection of self-referential structures, called


nodes, connected by pointer links.

Linked list

Question: 4

A queue where all elements have equal priority is a

FIFO data structure

Question: 5

A file that is only read by a program is known as ____

Input file

Question: 6
Which of the following sorting algorithm is the slowest?

Bubble sort

Question: 7

Which of the following data structure can be used to represent


many-to-many relation?

Graph

Question: 8

Which of the following statement is not true about linked lists?

Element in a linked list, if it is sorted, can be quickly searched by


applying binary search technique

Question: 9

Which of the following is not a linear data structure?

Binary tree

Question: 10

Which of the following data structure permits insertion and


deletion operations only on one end of the structure?

Stack
UNIT-1
Marks distribution for Unit 1

4 + 4+ 2 +2 +1 = 13 Marks (Only 2 Question will be asked for 4 marks , 2 Questions will be asked for 2 Marks,
1 Question will be asked for 1 Mark )
Syllabus for Unit-1

Algorithms- Problem Solving, Introduction to Algorithms, Characteristics of algorithms, Algorithm design


tools: Pseudo code and flowchart, Analysis of Algorithms, Complexity of algorithms- Space complexity, Time
complexity, Asymptotic notation- Big-O, Theta and Omega, standard measures of efficiency.
Data Structures- Data structure, Abstract Data Types (ADT), Concept of linear and Non-linear, static and
dynamic, persistent and ephemeral data structures, and relationship among data, data structure, and algorithm,
From Problem to Program.
Algorithmic Strategies- Introduction to algorithm design strategies- Divide and Conquer, and Greedy strategy.
Recurrence relation - Recurrence Relation, Linear Recurrence Relations, With constant Coefficients,
Homogeneous Solutions. Solving recurrence relations
Reference Book:

• “Fundamentals of Algorithmics”, Brassard & Bratley, ISBN 13-9788120311312


Id 1
Question The most common data types are..............
A Numeric, character, and logical.
B Array, integer and float
C Variable, Character and logical
D main, float and print
Answer A
Marks 2

Id 2
Question Numeric data include...........
A Double and Float
B integers and real numbers

C long int and short int


D None of these
Answer B
Marks 2

Id 3
Question Range for Positive & Negative Integers numbers are.......
A 4,792 or -637
B 5,297 or -376
C 9724 or -367
D 3,297 or -376
Answer B
Marks 2

Page 1
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Id 4
Question structure chart Or interactivity chart Shows -----------------
A input, the processing, and the output;
B a beginning analysis of the problem
C overall layout or structure of the solution;
D a language like solution
Answer C
Marks 2
Unit 1

Id 5
Question IPO chart, shows -----------------
A a language like solution
B a beginning analysis of the problem
C overall layout or structure of the solution;
D input, the processing, and the output;
Answer Correct Option D
Marks 2
Unit 1

Id 6
Question pseudo code shows --------------
A input, the processing, and the output;
B a beginning analysis of the problem
C overall layout or structure of the solution;
D a language like solution
Answer Correct Option D
Marks 2
Unit 1

Id 7
Question ---------------shows the relationship between the modules and the data needed for the
modules.
A coupling diagram and Data Dictionary
B IPO chart
C interactivity chart
D pseudo code
Answer Correct Option A
Marks 2
Unit 1

Page 2
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Id 8
Question Identify the correct sequence of problem analysis chart.
A 1)Given Data, 2)Solution Alternatives,3)Processing Required , 4)Required Results
B 1) Given Data, 2) Required Results , 3) Processing Required , 4)Solution Alternatives
C 1)Processing Required, 2) Required Results , 3)Given Data, 4)Solution Alternatives
D 1) Given Data, 2) Required Results , 3) Solution Alternatives, 4)Processing Required
Answer Correct Option B
Marks 2
Unit 1

Id 9
Question In interactivity chart Dark circle • on module link shows
A module is part of a set but that are not processed many times
B module is not a part of set that are processed many times & in a loop.
C module is part of a set that are processed many times & in a loop.
D None of these
Answer Correct Option C
Marks 2
Unit 1

Id 13
Question arrange the essential data items for IPO Chart in correct order
A 1)Output 2)Processing 3)Module Reference 4)Input
B 1)Input 2)Module 3) Processing Reference 4)Output
C 1)Input 2)Processing 3)Module Reference 4)Output
D None of these
Answer Correct Option C
Marks 4
Unit 1
Id Keep it blank

Id 10
Question If max is a function that returns the larger of the two integers, given as arguments,
then which of the following statements finds the largest of three given numbers
A max(max(a,b),max (a,c))
B max(max(a,b),max (b,c))
C max(b,max (a,c))
D All of these
Answer Correct Option D
Marks 4

Page 3
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Unit 1

Id 11
Question A function can make…………..
A One throw
B One throw of each scale type
C One throw of each programmer defined type
D As many throws of as many types as necessary
Answer Correct Option D
Marks 2
Unit 1

Id 12
Question Consider the function
find ( int x, int y)
{
return (( x < y ) ? 0 : ( x - y ));
}
Let a, b be two non-negative integers.
The call find{ a, find(a, b)} can be used to find the
A maximum of a,b
B positive difference of a,b
C sum of a,b
D minimum of a,b
Answer Correct Option D
Marks 4
Unit 1

Id 13
Question Let a, b be two non-negative integers. Which of the following calls, finds the positive
difference of a and b ?
A find(a,b) + find(b,a)
B find(a, find(a,b))
C a + find(a,b)
D b + find(a,b)
Answer Correct Option A
Marks 4
Unit 1

Id 14
Question The default parameter passing mechanism is
A call by value

Page 4
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

B call by reference
C call by value result
D none of the above
Answer Correct Option A
Marks 2
Unit 1

Id 15
Question Use of functions
A helps to avoid repeating a set of statements many times
B enhances the logical clarity of the program
C helps to avoid repeated programming across programs
D all of the above
Answer Correct Option D
Marks 2
Unit 1

Id 15
Question Pick the correct statements
A The body of a function should have only one return statement
B The body of a function may have many return statements
C A function can return only one value to the calling environment
D Both (b) and (c )
Answer Correct Option D
Marks 2
Unit 1

Id 16
Question Forward declaration is absolutely necessary
A if a function returns a non integer quantity
B lithe function call precedes its definition
C if the function call precedes its definition and the function returns a non integer
quantity
D none of the above
Answer Correct Option C
Marks 2
Unit 1

Id 17
Question void can be used…………
A as a data type of a function that returns nothing to its calling environment

Page 5
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

B inside the brackets of a function that does not need any argument
C in an expression
D Both (a) and (b)
Answer Correct Option D
Marks 2
Unit 1

Id 18
Question Any C++ program
A must contain at least one function
B need not contain any function
C needs input data
D none of these
Answer Correct Option A
Marks 1
Unit 1

Id 19
Question In a certain language, the expression 5-3+2 x 4+1, evaluates to 0. Which of the
following conclusions about the precedence and associativity of the operators +, -, *
are correct?
A + has precedence over - and - has precedence over *
B All these have equal precedence and associate to the right
C All these have equal precedence and associate to the left
D + and – have equal precedence, which is over * and all associate to the left
Answer A
Marks 2
Unit 1

Id 20
Question Which of the following comparison between static and dynamic type checking is
Incorrect?
A Dynamic type checking slows down execution
B Dynamic type checking offers more flexibility to the programmers
C Dynamic type checking is more reliable
D Dynamic type checking is done during compilation, unlike static type checking
Answer A
Marks 2
Unit 1

Id 21

Page 6
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Question The period of time between an allocation and its subsequent disposal is called
A Scope
B (dynamic) binding
C Lifetime
D Longevity
Answer C
Marks 2
Unit 1

Id 22
Question Consider the following sequence of statements
Statement 1: A := B+C
Statement 2: D := A+C
Statement 3: E := A+B
Statement 4: G := D-E
Statement 5: H := E+A
Statement 6: I := H+G
Which of the statements can be executed in parallel?

A 2 and 4
B 4 and 5
C 5 and 6
D 4, 5 and 6
Answer A
Marks 2
Unit 1

Id 23
Question If instructions are executed in parallel, whenever the required operands are
available, then the execution time of the previous problem is logically same as that of
sequential algorithm consisting of
A 3 statements
B 2 statements
C 4 statements
D 5 statements
Answer C
Marks 2
Unit 1

Id 24
Question
A recursive function f(x), is defined as follows:
if(x>100)
return(x-10)
else return(f(f(x+11)))
For which of the values of x, f(x) = 91?

Page 7
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

A 100
B 91
C 1
D 101
Answer A
Marks 2
Unit 1

Id 25
Question English language uses full stop as a sentence, while C++ uses ……….
A Separator
B Terminator
C Delimiter
D All of the above
Answer B
Marks 2
Unit 1

Id 26
Question The ASCII (American Standard Code for Information Interchange) character set
contains ------------- characters.
A 652
B 562
C 256
D 265
Answer C
Marks 2
Unit 1

Id 27
Question The character data set, sometimes called alphanumeric data set, consists of all------
A a, A
B A, Z
C #, &
D a, A, Z, 3, #, &
Answer D
Marks 2
Unit 1

Id 33
Question Character data or string data can be joined together with the + operator in an

Page 8
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

operation called-----------
A Palindrome
B Join
C Reverse String
D concatenation
Answer D
Marks 1
Unit 1

Id 34
Question When two pieces of character data are joined, the concatenation results in “4” + “4”
= ? (Replace? With suitable option)
A “44”
B 8
C “8”
D 4+4
Answer A
Marks 2
Unit 1

Id 35
Question Identify the data type for following data set : The price of an Item: 7.39, 12.98
A Numeric: real
B Character string
C Numeric: integer
D Logical
Answer A
Marks 1
Unit 1

Id 36
Question Identify the data type for following data set : An account number: “A2453,” “2987”
A Numeric: real
B Character string
C Numeric: integer
D Logical
Answer B
Marks 2
Unit 1

Id 37

Page 9
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Question Identify the data type for following data set :A quantity:12389
A Numeric: real
B Numeric: integer
C Reverse String
D Logical
Answer B
Marks 1
Unit 1

Id 38
Question Identify the data type for following data set :A credit check: True, False
A Numeric: real
B Numeric: integer
C Logical
D Character string
Answer C
Marks 1
Unit 1

Id 39
Question Choose the correct syntax for defining the function
A Function(Data);
B DefineFunction(value)
C FunctionName(Value)

D FunctionName(Value)
Answer C
Marks 1
Unit 1

Id 40
Question Absolute value, or a random number are belongs to which function type?
A Mathematical functions
B String functions.

C Conversion functions.
D Statistical functions.
Answer A
Marks 1
Unit 1

Id 41

Page 10
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Question Unrestricted use of goto is harmful because


A It makes debugging difficult
B It increase the running time of program
C It increase memory requirements of program
D It result in the compiler generating longer machine code
Answer Correct option A
Marks 1
Unit 1

Id 42
Question The recurrence relation that arises in relation with the complexity of binary search
is
A T(n)=T(n/2)+k, where k is constant
B T(n)=2T(n/2)+k, where k is constant
C T(n)=T(n/2)+log(n)
D T(n)=T(n/2)+n
Answer Correct option A
Marks 1
Unit 1

Id 43
Question Which of the following algorithm design technique is used in the quick sort
algorithm
A Dynamic programming
B Backtracking
C Divide & conquer
D Greedy method
Answer Correct option C
Marks 1
Unit 1

Id 44
Question Literal means
A a string
B a string constant
C a character
D an alphabet
Answer Correct Option B
Marks 2
Unit Unit 1

Page 11
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Id 45
Question The value of an automatic variable that is declared but not initialized will be
A 0
B -1
C unpredictable(garbage value)

D none of these
Answer Correct Option C
Marks 2
Unit Unit 1

Id 46
Question Which of the following is true of external variables?
A they provide a way for two way communication between functions
B their scope extends from the point of definition through the remainder of the
program
C if they are not initialized, they will be initilised to zero
D All of these
Answer Correct Option D
Marks 2
Unit Unit 1

Id 47
Question The declaration
int x : 4;
means
A x is a four digit integer
B x cannot be greater than a four digit integer
C x is a four-bit integer
D none of these
Answer Correct Option C
Marks 4
Unit Unit 1

Id 48
Question What is the correct way to round off x from a float, to an int value?

A y=(int) (x+0.5)
B y=int (x+0.5)
C y=(int) x+0.5
D y=(int)(int) x+0.50
Answer Correct Option A
Marks 4
Unit Unit 1

Page 12
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Id Keep it blank
Question By default, any real number in 'C' is treated as ……..
A A float
B A double
C A long double
D Depends on the memory model you are using
Answer Correct Option B
Marks 2
Unit Unit 1

Id 49
Question To print out a and b given below, which printf() statement would you use?
float a = 3.14;
double b = 3.14;
A printf("%f%f",a,b);
B printf("%Lf%f",a,b);
C printf("%f%Lf",a,b);
D printf("%Lf%Lf",a,b);
Answer Correct Option A
Marks 4
Unit Unit 1

Id 50
Question In the following 'C' code, in which order the functions would be called ?
a = ( f1(23,14 ) * f2 (12/14)) + f3 () ;
A f1,f2,f3
B f3,f2,f1
C The order may vary from compiler to compiler
D None of these
Answer Correct Option A
Marks 4

Unit Unit 1

Id 51
Question Which one of the following is not the step in ensuring best decision
A Identify the problem.
B Understand the problem.
C Discard the problem & solution
D Evaluate the solution.
Answer C
Marks 2

Page 13
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Unit 1

Id 52
Question Solutions that cannot be reached through a direct set of steps are called..........
A algorithmic solutions.
B alternative Solution
C heuristic solutions.
D straightforward Solution
Answer C
Marks 2
Unit 1

Id 53
Question A problem that can be solved with a series of actions is called............
A Heuristic solutions.
B Algorithmic solutions.
C straightforward Solution
D alternative Solution
Answer B
Marks 2
Unit 1

Id 54
Question A heuristic type of problems is called..........
A Operation Research

B Artificial intelligence
C Fuzzy Logic
D None of these
Answer B
Marks 2
Unit 1

Id 55
Question The.................... steps in problem solving lead to the best possible solution to a
problem.
A Six
B Four
C Five
D Seven
Answer A
Marks 1

Page 14
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Unit 1

Id 56
Question The..................solutions are reached in a series of steps.
A algorithmic solutions
B heuristic solutions
C Artificial intelligence
D straightforward Solution
Answer A
Marks 1
Unit 1

Id 57
Question The...................... solutions are attained through trial and error.
A straightforward Solution
B alternative Solution
C algorithmic solutions.
D heuristic solutions.
Answer D
Marks 1
Unit 1

Id 58
The programmer defines each .............and ............... in a problem solution as a
Question particular data type
A Pointer , Array
B Integer , Double
C String , Float
D constant , variable
Answer D
Marks 1
Unit 1

Id 59
Question Variable also known as .....
A Font
B Constant
C Identifier
D File
Answer C
Marks 1

Page 15
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Unit 1

Id 60
Question A constant is a value that never changes during the processing of all the instructions
in a solution
A FALSE
B None of these
C TRUE
D Both A &C
Answer D
Marks 1
Unit 1

Id 61
Question In UML Sequence diagram used to indicate----------

A to create a logical model of your solution


B how a system functions from the user‟s standpoint
C describe how a class functions
D interactivity between objects
Answer D
Marks 2
Unit 1

Id 62
Question In UML Use case diagrams Used to indicate----------
A how a system functions from the user‟s standpoint
B to create a logical model of your solution
C describe how a class functions
D interactivity between objects
Answer A
Marks 2
Unit 1

Id 63
Question In UML Class diagrams Used to indicate----------
A describe how a class functions
B how a system functions from the user‟s standpoint
C to create a logical model of your solution
D interactivity between objects
Answer A
Marks 2

Page 16
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Unit 1

Id 64
Question Two main measures for the efficiency of an algorithm are
A Processor and memory
B Complexity and Capacity
C Time and Space
D Data and Space
Answer C
Marks 2
Unit 1

Id 65
Question The time factor while determining the efficiency of algorithm is measured by
A Counting microseconds
B Counting the number of key operations
C Counting the number of statements
D Counting the kilobytes of algorithm
Answer B
Marks 2
Unit 1

Id 66
Question The worst case occur in linear search algorithm when
A Item is somewhere in the middle of the array
B Item is not in the array at all
C Item is the last element in the array
D Item is the last element in the array or is not there at all
Answer D
Marks 2
Unit 1

Id 67
Question In case of ordinary int variables
A leftmost bit is reserved for sign
B rightmost bit is reserved for sign
C no bit is reserved for sign
D none of these
Answer A
Marks 2

Page 17
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Unit 1

Id 68
Question The variables which can be accessed by all modules in a program are known as

A Local variables
B Internal variables
C External variables
D Global variables
Answer Correct Option (D)
Marks 2
Unit 1

ID 69
Question The basic unit of information is the
A Byte
B Bit
C Block
D Sector
Answer B
Marks 2
Unit 1

ID 70
Question The most widely used method for interpreting bit setting as nonnegative integer is
the
A Octal number system
B ASCII
C ANS!
D Binary number system
Answer D
Marks 2
Unit 1

ID 71
Question The method used by the computers to represent real number is
A Floating-point notation
B Mantissa
C ANSI
D Binary number system
Answer D
Marks 2

Page 18
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Unit 1

ID 72
Question The variable which can be accessed by all modules in a program, are known as
A Local variable
B Internal variable
C External variable
D Global variable
Answer D
Marks 2
Unit 1

ID 73
Question In which kind of storage structure for string , one can easily insert ,delete,
concatenate ,and rearrange substring?
A Fixed length storage structure
B Variable length storage structure
C Linked list storage
D Array type storage
Answer C
Marks 2
Unit 1

ID 74
Question Which of the following sorting procedure is the slowest ?
A Quick sort
B Heap sort
C Shell sort
D Bubble sort
Answer B
Marks 2
Unit 1

ID 75
Question The smallest element of an array‟s index is called its

A Lower bound
B Upper bound
C Range
D Extraction
Answer A

Page 19
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Marks 2
Unit 1

ID 76
Question The preliminary evaluation of a top-down design before programs are written is
referred to as a (an)
A Informal design review
B Structured walk through
C formal design review
D Scheduled review
Answer A
Marks 2
Unit 1

ID 77
Question Which of the following is not an example of program documentation
A Source code
B Object code
C Specification
D Identifier names
Answer B
Marks 1
Unit 2

ID 78
Question Which of the following is non-essential to stepwise refinement?
I. Refining the subprogram
II. Decomposing the problem into subprograms
III. Declaring all variables
IV. Stating the problem simply
V. Inputing the data

A 2
B 3 and 4
C 4 and 5
D 5
Answer D
Marks 4
Unit 1

ID 79
Question A top-down approach to programming calls for
1. Working from the general to the specific

Page 20
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

2. Postponing the minor decisions


3. A systematic approach
4. Immediate coding of the problem

A 1
B 1 and 2
C 1,2 and 3
D 1,2 and 4
Answer C
Marks 4
Unit 1

ID 80
Question Repeated execution of simple computation of
A Round-off errors
B Syntax errors
C Run-time errors
D Logic errors
Answer A
Marks 2
Unit 1

ID 81
Question Which of the following boolean expression is true?
A 2*2+3=10
B (2.4)and not(4.3)
C (5.6)or(3 div 3 = 1)
D -7 * 2 + 2 * 7 = 1
Answer C
Marks 2
Unit 1

id 82
Question In C++ programming language, which of the following type of operators have the
highest precedence
A Relation operators
B Equality operators
C Logical operators
D Arithmetic operators
Answer D
Marks 2
Unit 1

Page 21
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

196 83
Question In C++ programming language, which of the following operators has the highest
precedence
A Unary +
B *
C ≥
D ==
Answer A
Marks 2
Unit 1

197 84
In C++ programming language, if the first and the second operands of operator + are
Question of types int and float,respectively,the result will be of type
A int
B float
C char
D Long int
Answer B
Marks 2
Unit 1

199 85
Question In C++ language, the bitwise operators can be applied to which of the following
operands
A char
B Short,long
C Int
D All of the above
Answer D
Marks 2
Unit 1

Id 86
Question Consider the n elements are to be sorted. what is the worst case time complexity of
20 bubble sort?
A O(1)
B O(log2 n)
C O(n)
2
D O(n )
Answer Correct Option (D)

Page 22
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Marks 4
Unit 1

Id 87
Question Consider that n elements are to be sorted. What is the worst case time complexity of
21 shell sort?
A O(n)
B O(n log2 n)

C O(n1.2)
D O(n)

Answer Correct Option (C)


Marks 4
Unit 1

Id 88
Question What is the worst case time Complexity of straight insertion sort algorithm to sort n
22 elements
A O (n)
B O (n Log2 n)

C O(n1.2)
D O(n2)
Answer Correct Option(D)
Marks 4
Unit 1

Id 89
Question What is the worst space time complexity of binary insertion sort algorithm to sort n
23 elements
A O(n)
B O(n log2 n)

C O(n1.2)
D O(n2)
Answer Correct Option (D)
Marks 4
Unit 1

Id 90
Question 25 Which of the following sorting procedure in the slowest?
A Quick sort
B Heap sort
C Shell sort

Page 23
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

D Bubble sort
Answer Correct option (D)
Marks 2
Unit 1

Id 91
Question In a 'C++' expression involving || operator, evaluation
A Will be stopped if one of its components evaluates to false
B Will be stopped if one of its components evaluates to true
C Takes place from right to left
D Will be stopped if both of its components evaluates to true
Answer Correct Option B
Marks 2
Unit 1

Id 92
Question In C programming language, which of the following type of operators have the
highest precedence
A Relational Operators
B Equality Operators
C Logical Operators
D Arithmetic Operators
Answer Correct Option D
Marks 2
Unit 1

Id 93
Question In C programming language, which of the following operators has the highest
precedence?
A Unary +
B *
C >=
D Equals (==)
Answer Correct Option A
Marks 2
Unit 1

Id 94
Question Which of the following operators takes only integer operands ?
A +
B *

Page 24
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

C /
D %
Answer Correct Option D
Marks 2
Unit 1

Id 95
Question In an operation involving || operator, evaluation
A takes palce from left to right
B Will be stopped if one of its components evaluates to true
C Takes place from right to left
D Both (a) and (b)
Answer Correct Option D
Marks 2
Unit 1

Id 96
Question Pick the operators that associate from the left
A +
B ,
C <
D All the above
Answer Correct Option D
Marks 2
Unit 1

Id 97
Question The operators . , || , < , = , if arranged in the ascending order of precedence reads
A . , || , < , =
B (=, < , ||, .)
C (=, || , < , .)

D (< , || , = , .)
Answer Correct Option C
Marks 2
Unit 1

Id 98
Question The expression 4 + 6 / 3 * 2 - 2 + 7 % 3 evaluates to
A 3
B 5

Page 25
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

C 6
D 7
Answer Correct Option D
Marks 4
Unit 1

Id 99
Question Which of the following sorting algorithm is stable
A insertion sort.
B bubble sort.
C quick sort.
D heap sort.
Answer Correct Option D
Marks 2
Unit 1

Id 100
Question The number of elements that can be sorted in Θ(logn) time using heap sort is
A Θ(1)
B Θ(√logn)
C Θ(√logn)
D Θ(logn)
Answer Correct Option A
Marks 2
Unit 1

Id 101
Question A sort which relatively passes through a list to exchange the first element with any
element less than it and then repeats with a new first element is called
A Insertion sort
B Selection sort
C Heap sort
D Quick sort
Answer Correct Option D
Marks 2
Unit 1

Id 102
Question A sorting technique which uses the binary tree concept such that label of any node is
larger than all the labels in the subtrees, is called
A Selection sort

Page 26
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

B Insertion sort
C Insertion sort
D Quick sort
Answer Correct Option C
Marks 2
Unit 1

Id 103
Question A sort which uses binary tree concept such that any number is larger than all the
numbers in the subtree below it,is called
A Selection sort
B Insertion sort
C Heap sort
D Quick sort
Answer Correct Option C
Marks 2
Unit 1

Id 104
Question Which sorting algorithm uses the median-of-3 partitioning?
A heap sort

B merge sort
C quick sort
D Shell sort
Answer Correct Option
Marks 2
Unit 1

Id 105
Question Which data type is not a primary data type?
A int
B array
C float
D char
Answer Correct Option B
Marks 1
Unit 1

Id 106
Question How much memory is required to store a value of type double
A 4bytes

Page 27
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

B 6 bytes
C 8 bytes
D 10 bytes
Answer Correct Option C
Marks 1
Unit 1

Id 107
Question The modifier which is used to declare a variable as constant
A short
B signed
C unsigned
D const
Answer Correct Option D
Marks 1
Unit 1

Id 108
Question A declaration "short int" is used for variables
A which have a short duration in a program
B which have short names
C which may require less storage than normal integer
D all of these
Answer Correct Option C
Marks 1
Unit 1

Id 109
Question 5 The number of swapping needed to sort the number 8,12,7,9,31,19,5,13 in ascending
order, using bubble sort is
A 11
B 12
C 13
D 14
Answer D
Marks 4
Unit 1

Id 110
Question 6 Given 2 sorted list of size „m‟ and „n‟ respectively. The number of comparisons needed
in the worst case by the merge sort algorithm will be

Page 28
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

A mn
B max (m,n)
C min (m,n)
D M+n-1
Answer B
Marks 4
Unit 1

Id 111

A hash table with 10 buckets with one slot per bucket is depicted. The symbols, S1 to
Question 8 S7 are initially entered using a hashing function with linear probing. The maximum
number of comparisons needed in searching an item that is not present is
A 4
B 5
C 6
D 3
Answer B
Marks 4
Unit 1

Id 112
Question 9 A binary tree in which every non-leaf node has non-empty left and right sub-trees is
called a strictly binary tree. Such a tree with 10 leaves
A Cannot have more than 19 node
B Has exactly 19 nodes
C Has exactly 17 nodes
D Cannot have more than 17 nodes
Answer A
Marks 4
Unit 1

Id 113
Question 87 The variables which can be accessed by all modules in a program, are called
A local variables
B internal variables
C external variables
D global variable
Answer D
Marks 2
Unit 1

Page 29
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Id 114
Question 90 A static variable
A cannot be initialized
B is initialized once at the commencement of execution and cannot be changed at run
time

C retains its value throughout the file of the program


D is same as an automatic variable but is placed at the head of the program
Answer C
Marks 2
Unit 1

Id 115
Question 31 To find the length or the number of characters in the string, which function type you
will use?
A String Functions
B Mathematical functions.
C Conversion functions.
D Statistical functions.
Answer A
Marks 1
Unit 1

Id 116
Question 32 Match the Definitions from given options, for the function Sqrt(N)
A Returns the absolute value of N
B Returns the square root of N.
C Returns the rounded value of N to the n1 place.
D Returns a random number between 0 and 1
Answer B
Marks 2
Unit 1

Id Keep it blank
Question 33 Match the Definitions from given options, for the function Abs(N)
A Returns the square root of N.
B Returns the absolute value of N.
C Returns the rounded value of N to the n1 place.
D Returns a random number between 0 and 1
Answer B
Marks 2
Unit 1

Page 30
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

DEPARTMENT OF COMPUTER ENGINEERING , MATOSHRI COLLEGE OF ENGINEERING & R.C. NASHIK , PAGE NO. .40

Id 117
Question 34 If we use function Integer (5.7269) then what will be the result it will return.
A 5.72
B 5.7269
C 5
D 5.7
Answer C
Marks 4
Unit 1

Id 118
Question 35 If we use function Abs (-3)then what will be the result it will return.
A -3
B -3
C 3
D A3.0
Answer C
Marks 4
Unit 1

Id 119
Question Replace blank space with suitable option :- ----------- are used to calculate things
such as maximum values, minimum values, and so forth..
A Statistical functions.
B Mathematical functions.
C String functions.
D Conversion functions
Answer A
Marks 1
Unit 1

Id 120
Question Select appropriate definition from given options for the function Value(S)
A Changes a string value into a numeric value.
B Changes a numeric value into a string value.

Page 31
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

DEPARTMENT OF COMPUTER ENGINEERING , MATOSHRI COLLEGE OF ENGINEERING & R.C. NASHIK , PAGE NO. .41

C Returns the average of a list of numbers.


D Returns the maximum value from a list of numbers.
Answer A
Marks 2
Unit 1

Id 121
Question Select appropriate definition from given options for the function String(N)
A Changes a string value into a numeric value.
B Changes a numeric value into a string value.
C Returns the average of a list of numbers.
D Returns the maximum value from a list of numbers..
Answer B
Marks 2
Unit 1

Id 122
Question Which of the following sorting algorithms does not have a worst case running time of
o(n2)
A Insertion sort
B Merge sort
C Quick sort
D Bubble sort
Answer Correct Option (B)
Marks 2
Unit 1

Id 123
Question Identify the operator & operand from given expression 5 + 7
A 5 and 7 are operator, + is the operand
B 5 is operator & 7 is operand
C + is the operator, 5 and 7 are the operand
D None of these
Answer C
Marks 1
Unit 1

Page 32
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Id 124
Question Calculate the resultant for the operation like 9 MOD 4
A 2
B 0.44
C 2.25

D 1
Answer D
Marks 2
Unit 1

Id 125
Question Choose the correct resultant for the logical operation like:- True AND True
A TRUE
B FALSE
C Both A&B
D None of these
Answer A
Marks 2
Unit 1

Id 126
Question Construct the expression for”a 40-hour work week and overtime pay at 1.5 times
regular pay, calculated overtime pay would subtract 40 from the hours worked and
multiply the result by the regular wage times 1.5”
A (Hours-40)*Wage*1.5
B (Wage-40)*Hours*1.5
C (Hours-1.5)*Wage*40
D (Overtime-40)*Regular Pay*1.5
Answer A
Marks 2
Unit 1

Id 127
Question --------------------refers to the rules governing the computer operating system, the
language, and the application.
A Bug.
B Syntax
C Debugging.
D Testing
Answer B
Marks 2

Page 33
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Unit 1

Id 128
Question Problem analysis chart shows -----------------
A input, the processing, and the output;
B overall layout or structure of the solution;
C a beginning analysis of the problem
D a language like solution
Answer C
Marks 1
Unit 1

Id 129
Question Which of the following case does not exist in complexity theory?
A Best case
B Worst case
C Average case
D Null case
Answer D
Marks 1
Unit 1

Id 130
Question The complexity of linear search algorithm is
A O(n)
B O(log n)
C O(n2)
D O(n log n)
Answer A
Marks 1
Unit 1

Id 131
Question The complexity of Binary search algorithm is
A O(n)
B O(log n)
C O(n2)
D O(n log n)
Answer B
Marks 1
Unit 1

Id 132
Question The complexity of merge sort algorithm is
A O(n)
B O(log n)
C O(n2)

Page 34
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

D O(n log n)
Answer D
Marks 1
Unit 1

Id 133
Question The complexity of Bubble sort algorithm is
A O(n)
B O(log n)
C O(n2)
D O(n log n)
Answer C
Marks 1
Unit 1

Id 134
Question The Worst case occur in linear search algorithm when
A Item is somewhere in the middle of the array
B Item is not in the array at all
C Item is the last element in the array
D Item is the last element in the array or is not there at all
Answer D
Marks 1
Unit 1

Id 135
Question The worst case complexity for insertion sort is
A O(n)
B O(log n)
C O(n2)
D O(n log n)
Answer C
Marks 1
Unit 1

Id 136
Question The complexity of Fibonacci series is
A O(2n)
B O(log n)
C O(n2)
D O(n log n)
Answer A
Marks 1
Unit 1

Id 137
Question If f(x) = 3x2 + x3logx, then f(x) is
A O(x2)
B O(x3)

Page 35
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

C O(x)
D O(1)
Answer B
Marks 1
Unit 1

Id 138
Question The big-O notation for f(n) = (nlogn + n2)(n3 + 2) is
A O(n2)
B O(3n)
C O(n4)
D O(n5)
Answer D
Marks 1
Unit 1

Id 139
Question The big-O notation for f(n) = 2log(n!) + (n2 + 1)logn is
A n
B n2
C nlogn
D n2logn
Answer D
Marks 1
Unit 1

Id 140
Question The big-theta notation for function f(n) = 2n3 + n – 1 is
A n
B n2
C n3
D n4
Answer C
Marks
Unit

Id 141
Question The big-theta notation for f(n) = nlog(n2 + 1) + n2logn is
A n2logn
B n2
C logn
D nlog(n2)
Answer A
Marks 1
Unit 1

Id 142
Question The big-omega notation for f(x, y) = x5y3 + x4y4 + x3y5 is
A x5y3

Page 36
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

B x5y5
C x3y3
D x4y4
Answer C
Marks 1
Unit 1

Id 143
Question If f1(x) is O(g(x)) and f2(x) is o(g(x)), then f1(x) + f2(x) is
A O(g(x))
B o(g(x))
C O(g(x)) + o(g(x))
D None of these
Answer A
Marks 1
Unit 1

Id 144
Question The big-O notation for f(x) = 5logx is
A 1
B X
C X2
D X3
Answer B
Marks 1
Unit 1

Id 145
Question Which if the following is/are the levels of implementation of data structure
A Abstract level
B Application level
C Implementation level
D All of the above
Answer D
Marks 1
Unit 1

Id 146
Question ……………….. level is where the model becomes compatible executable code
A Abstract level
B Application level
C Implementation level
D All of the above
Answer C
Marks 1
Unit 1

Id 147
Question Stack is also called as

Page 37
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

A Last in first out


B First in last out
C Last in last out
D First in first out
Answer A
Marks 1
Unit 1

Id 148
Which of the following is true about the characteristics of abstract data types?
i) It exports a type.
Question ii) It exports a set of operations
A True, False
B False, True
C True, True
D False, False
Answer C
Marks 1
Unit 1

Id 149
Question …………… is not the component of data structure.
A Operations
B Storage Structures
C Algorithms
D None of above
Answer D
Marks 1
Unit 1

Id 150
Question Which of the following is not the part of ADT description?
A Data
B Operations
C Both of the above
D None of the above
Answer D
Marks 1
Unit 1

Id 151
Inserting an item into the stack when stack is not full is called …………. Operation
and deletion of item form the stack, when stack is not empty is called
Question ………..operation.
A push, pop
B pop, push
C insert, delete
D delete, insert
Answer A
Marks 2

Page 38
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Unit 1

Id 152
……………. Is a pile in which items are added at one end and removed from the
Question other.
A Stack
B Queue
C List
D None of the above
Answer B
Marks 1
Unit 1

Id 153
………… is very useful in situation when data have to stored and then retrieved in
Question reverse order.
A Stack
B Queue
C List
D Link list
Answer A
Marks 1
Unit 1

Id 154
Question Which data structure allows deleting data elements from and inserting at rear?
A Stacks
B Queues
C Dequeues
D Binary search tree
Answer B
Marks 1
Unit 1

Id 155
Which of the following data structure can't store the non-homogeneous data
Question elements?
A Arrays
B Records
C Pointers
D Stacks
Answer A
Marks 1
Unit 1

Id 156
A ....... is a data structure that organizes data similar to a line in the supermarket,
Question where the first one in line is the first one out.
A Queue linked list
B Stacks linked list

Page 39
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

C Both of them
D Neither of them
Answer A
Marks 1
Unit 1

Id 157
Identify the data structure which allows deletions at both ends of the list but
Question insertion at only one end.
A Input-restricted deque
B Output-restricted deque
C Priority queues
D None of above
Answer A
Marks 1
Unit 1

Id 158
Question Which of the following data structure is non-linear type?
A Strings
B Lists
C Stacks
D None of above
Answer D
Marks 1
Unit 1

Id 159
Question Which of the following data structure is linear type?
A Strings
B Lists
C Queues
D All of above
Answer D
Marks 1
Unit 1

Id 160
To represent hierarchical relationship between elements, which data structure is
Question suitable?
A Deque
B Priority
C Tree
D All of above
Answer C
Marks 1
Unit 1

Id 161

Page 40
Data Structures & Algorithms M.C.Q. BANK, FOR UNIT -1 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN , U.O.P.

Question An algorithm that calls itself directly or indirectly is known as


A Sub algorithm
B Recursion
C Polish notation
D Traversal algorithm
Answer B
Marks 1
Unit 1

Id 162
Question A mathematical-model with a collection of operations defined on that model is called
A Data Structure
B Abstract Data Type
C Primitive Data Type
D Algorithm
Answer B
Marks 1
Unit 1

Page 41
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

UNIT-2
Marks distribution for Unit 2

4 + 4+ 2 +2 +1 = 13 Marks (Only 2 Question will be asked for 4 marks , 2 Questions will be asked for 2
Marks, 1 Question will be asked for 1 Mark )
Syllabus for Unit-2

Sequential Organization, Linear Data Structure Using Sequential Organization, Array as an Abstract
Data Type, Memory Representation and Address Calculation, Inserting an element into an array,
Deleting an element, Multidimensional Arrays, Two-dimensional arrays, n- dimensional arrays, Concept
of Ordered List, Single Variable Polynomial, Representation using arrays, Polynomial as array of
structure, Polynomial addition, Polynomial multiplication, Sparse Matrix, Sparse matrix representation,
Sparse matrix addition, Transpose of sparse matrix, String Manipulation Using Array.
Case Study- Use of sparse matrix in Social Networks and Maps.
Reference Book:
• “Data Structures Using C++”, Varsha H. Patil, ISBN 13-9780198066231
Id 1
What will happen if in a C++ program, you assign a value to an array element whose
Question subscript exceeds the size of array?
A The element will be set to 0.
B The compiler would report an error
C The program may crash if some important data gets overwritten.
D The array size would appropriately grow.
Answer C
Marks 2

Id 2
What does the following declaration mean?
Question int (*ptr)[10];
A ptr is array of pointers to 10 integers
B ptr is a pointer to an array of 10 integers
C ptr is an array of 10 integers
D ptr is an pointer to array
Answer B
Marks 2

Id 3
Question In C++, if you pass an array as an argument to a function, what actually gets passed?
A Value of elements in array
B First element of the array
C Base address of the array
D Address of the last element of array
Answer C
Marks 2

Id 4
What is meaning of following declaration ?
Question int arr[20];

Page 1
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

A None of these
B Integer Array of size 20
C Array of Size 20
D Array of size 20 that can have integer address
Answer B
Marks 2

Id 5

int a[20];
What will be the size of above array element ?
Question
A 20
B 19
C 22
D 21
Answer A
Marks 2

Id 6
Question What is meaning of the following statement? int *ptr[20];
A None of these
B Array of Integer Pointers of size 20
C Integer Array to Integer Pointers having size 20
D Integer Array of size 20 pointing to an Integer Pointer
Answer B
Marks 2

Id 7
Question In C++ Programming, If we need to store word "INDIA" then syntax is as below -
char name[]; name = "INDIA";
A
char name[6] = {'I','N','D','I','A'}
B
char name[6] = {"I","N","D","I","A"}
C
char name[6] = {'I','N','D','I','A','\0'}
D
Answer D
Marks 2

Id 8

int RollNum[30][4];
Above is an example of:
Question
A 2-D Array
B 1-D Array
C 3-D Array
D 4-D Array

Page 2
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

Answer A
Marks 2

Id 9
What is the output of this C code?
#include <stdio.h>
void main()
{
int a[2][3] = {1, 2, 3, 4, 5};
int i = 0, j = 0;
for (i = 0; i < 2; i++)
for (j = 0; j < 3; j++)
printf("%d", a[i][j]);
Question }
A 123450
B 1 2 3 4 5 junk
C 123455
D Run time error
Answer A
Marks 4

Id 10
What is the output of this C code?
#include <stdio.h>
void main()
{
int a[2][3] = {1, 2, 3, , 4, 5};
Question
int i = 0, j = 0;
for (i = 0; i < 2; i++)
for (j = 0; j < 3; j++)
printf("%d", a[i][j]);
}
A 1 2 3 junk 4 5
B Compile time error
C 123045
D 123345
Answer B
Marks 4
Unit

Id 11
What is the output of this C code?
#include <stdio.h>
void f(int a[ ][3])
{
a[0][1] = 3;
int i = 0, j = 0;
for (i = 0; i < 2; i++)
for (j = 0; j < 3; j++)
printf("%d", a[i][j]);
}
void main()
Question {

Page 3
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

int a[2][3] = {0};


f(a);
}
A 030000
B Junk 3 junk junk junk junk
C Compile time error
D All junk values
Answer A
Marks 4
Unit

Id 12
What is the output of this C code?
#include <stdio.h>
void f(int a[ ][ ])
{
a[0][1] = 3;
int i = 0, j = 0;
for (i = 0;i < 2; i++)
for (j = 0;j < 3; j++)
printf("%d", a[i][j]);
}
void main()
{
int a[2][3] = {0};
f(a);
Question }
A 030000
B Junk 3 junk junk junk junk
C Compile time error
D All junk values
Answer C
Marks 4
Unit

Id 13
Which of the following statements are correct about 6 used in the program?
int num[6];
Question num[6]=21;
In the first statement 6 specifies a particular element, whereas in the second
A statement it specifies a type.
In the first statement 6 specifies a array size, whereas in the second statement it
B specifies a particular element of array.
In the first statement 6 specifies a particular element, whereas in the second
C statement it specifies a array size.
D In both the statement 6 specifies array size.
Answer B
Marks 2
Unit

Id 14
Which of the following statements are correct about an array?
1: The array int num[26]; can store 26 elements.
Question 2: The expression num[1] designates the very first

Page 4
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

element in the array.


3: It is necessary to initialize the array at the time of
declaration.
4: The declaration num[SIZE] is allowed if SIZE is a
macro.

A 1
B 1,4
C 2,3
D 2,4
Answer B
Marks 2
Unit

Id 15
What will be the output of the program ?
#include<stdio.h>

int main()
{
int a[5] = {5, 1, 15, 20, 25};
int i, j, m;
i = ++a[1];
j = a[1]++;
m = a[i++];
printf("%d, %d, %d", i, j, m);
return 0;
Question }
A 2,1,15
B 1,2,5
C 3,2,15
D 2,3,20
Answer C
Marks 4
Unit

Id 16
Question What will be the output of the program ?
#include<stdio.h>
int main()
{
static int a[2][2] = {1, 2, 3, 4};
int i, j;
static int *p[] = {(int*)a, (int*)a+1, (int*)a+2};
for(i=0; i<2; i++)
{
for(j=0; j<2; j++)
{
printf("%d, %d, %d, %d\n", *(*(p+i)+j), *(*(j+p)+i),
*(*(i+p)+j), *(*(p+j)+i));
}
}
return 0;
}
1, 1, 1, 1
A 2, 3, 2, 3

Page 5
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

3, 2, 3, 2
4, 4, 4, 4
1, 2, 1, 2
2, 3, 2, 3
3, 4, 3, 4
B 4, 2, 4, 2
1, 1, 1, 1
2, 2, 2, 2
2, 2, 2, 2
C 3, 3, 3, 3
1, 2, 3, 4
2, 3, 4, 1
3, 4, 1, 2
D 4, 1, 2, 3
Answer C
Marks 4
Unit

Id 17
What will be the output of the program ?
#include<stdio.h>
void fun(int **p);

int main()
{
int a[3][4] = {1, 2, 3, 4, 4, 3, 2, 8, 7, 8, 9, 0};
int *ptr;
ptr = &a[0][0];
fun(&ptr);
return 0;
}
void fun(int **p)
{
printf("%d\n", **p);
Question }
A 1
B 2
C 3
D 4
Answer A
Marks 4

Id 18
Question The extra key inserted at the end of the array is called a
A End Key
B Stop Key
C Sentinel
D Transposition
Answer C
Marks 1

Id 19
Question The size of array int a[5]={1,2} is
A 4
B 12

Page 6
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

C 10
D 6
Answer C
Marks 2

Id 20
The output of the following statements is
char ch[6]={„e‟, „n‟, „d‟, „\0‟, „p‟};
Question printf(“%s”, ch);
A endp
B end0p
C end
D error
Answer C
Marks 2

Id 21
Question To declare an array S that holds a 5-character string, you would write
A char S[5]
B String S[5]
C char S[6]
D String S[6]
Answer A
Marks 1

Id 22
Question If x is one dimensional array, then pick up the correct answer
A *(x + i) is same as &x[i]
B *&x[i] is same as x + i
C *(x + i) is same as x[i] +1
D *(x + i) is same as *x[i]
Answer A
Marks 2
Unit

Id 23
What will be the output of the following code segment?
main( ) {
char s[10];
strcpy(s, “abc”);
printf(“%d %d”, strlen(s), sizeof(s));
Question }
A 3 10
B 33
C 10 3
D 10 10
Answer A

Page 7
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

Marks 2
Unit

Id 24
Question What is the output of the following C++ program?
# include <stdio.h>
main ( )
{
int a, b=0;
static int c [10]={1,2,3,4,5,6,7,8,9,0};
for (a=0; a<10;+ + a)
if ((c[a]%2)= = 0) b+ = c [a];
cout<< b;
}
A 20
B 25
C 45
D 90
Answer A
Marks 2
Unit

Id 25
Question Sparse matrices have?
A no zero
B many zero
C higher dimension
D none
Answer B
Marks 1
Unit

Id 26
Consider the polynomial p(x) = a0 + a1x + a2x^2 +a3x^3, where ai != 0, for all i. The
Question minimum number of multiplications needed to evaluate p on an input x is:
A 3
B 4
C 6
D 9
Answer A
Marks 2
Unit

Id 27

Page 8
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

Question Which of the following data structure is linear data structure?


A Trees
B Graphs
C Arrays
D None of above
Answer C
Marks 1
Unit

Id 28
Question The elements of an array are stored successively in memory cells because
by this way computer can keep track only the address of the first element and the
A addresses of other elements can be calculated
the architecture of computer memory does not allow arrays to store other than
B serially
C both of above
D none of above
Answer A
Marks 1
Unit

Id 29
Question
Which of the following data structure is not linear data structure?
A Arrays
B Linked lists
C Both of above
D None of above
Answer D
Marks 1
Unit

Id 30
Question Finding the location of the element with a given value is:
A Traversal
B Search
C Sort
D None of above
Answer B
Marks 1
Unit

Id 31

Page 9
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

Question Arrays are best data structures


A for relatively permanent collections of data
B for the size of the structure and the data in the structure are constantly changing
C for both of above situation
D for none of above situation
Answer A
Marks 1
Unit

Id 32
Question Each array declaration need not give, implicitly or explicitly, the information about
A the name of array
B the data type of array
C the first data from the set to be stored
D the index set of the array
Answer C
Marks 1
Unit

Id 33
Question Which of the following data structure is non-linear type?

A Strings
B Lists
C Stacks
D Tree
Answer D
Marks 1
Unit 2

Id 34
Question Which of the following data structure is linear type?
A Array
B Tree
C Graphs
D Hierarchy
Answer A
Marks 1
Unit 2

Id 35
Question The logical or mathematical model of a particular organization of data is called a

Page 10
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

.........

A Data structure
B Data arrangement
C Data configuration
D Data formation
Answer A
Marks 1
Unit 2

Id 36

Question The simplest type of data structure is ..................


A Multidimensional array
B Linear array
C Two dimensional array
D Three dimensional array
Answer A
Marks 1
Unit 2

Id 37
Question Arrays are best data structures ............
A For relatively permanent collections of data.
B For the size of the structure and the data in the structure are constantly changing
C For both of above situation
D For none of the above
Answer A
Marks 1
Unit 2

Id 38
Question Which of the following data structures are indexed structures?
A Linear arrays
B Linked lists
C Graphs
D Trees
Answer A
Marks
Unit

Id 39

Page 11
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

Question Each node in a linked list has two pairs of .............. and ...................
A Link field and information field
B Link field and avail field
C Avail field and information field

D Address field and link field


Answer A
Marks 1
Unit 2

Id 40
Question A ........................ does not keep track of address of every element in the list.
A Stack
B String

C Linear array
D Queue
Answer A
Marks 1
Unit 2

Id 41
Question To implement Sparse matrix dynamically, the following data structure is used
A Trees
B Graphs
C Priority Queues
D Linked List
Answer D
Marks 1
Unit 2

Id 42
Question Sparse matrix has?
A Many zero entries
B Many non-zero entries
C Higher dimension
D None of the above
Answer A
Marks 1
Unit 2

Id 43

Page 12
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

The linked list implementation of sparse matrices is superior to the generalized dope
Question vector method because it is?
A Conceptually easier
B Completely dynamic
C Efficient in accessing an entry
D A and B
Answer D
Marks 1
Unit 2

Id 44
Question An array is a collection of:
A Different data types scattered throughout memory
B Same data types scattered throughout memory
C Same data types placed next to each other in memory
D Different data types placed next to each other in memory
Answer C
Marks 1
Unit 2

Id 45
Question Which of the declaration of array are correct?
A int a(25);
B int size = 10, b[size];
C int c = {0, 1, 2};

D None of the above


Answer D
Marks 1
Unit 2

Id 46
What is the difference between the 5‟s in these two expressions?(Select the correct
option)
int num[5];
Question num[5] = 11;
A First is particular element, second is type
B First is array size, second is particular element
C First is particular element, second is array size
D Both specify array size
Answer B
Marks 2
Unit 2

Page 13
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

Id 47
Let A be a square matrix of size n x n. Consider the following program. What is the
expected output?
C = 100
for i = 1 to n do
for j = 1 to n do
{
Temp = A[i][j] + C
A[i][j] = A[j][i]
A[j][i] = Temp - C
}
for i = 1 to n do
for j = 1 to n do
Question Output(A[i][j]);
A The matrix A itself
B Transpose of matrix A
Adding 100 to the upper diagonal elements and subtracting 100 from diagonal
C elements of A
D None of the above
Answer A
Marks 4
Unit 2

Id 48
The minimum number of arithmetic operations required to evaluate the polynomial
Question P(X) = X5 + 4X3 + 6X + 5 for a given value of X using only one temporary variable.

A 6
B 7
C 8
D 9
Answer B
Marks 2
Unit 2

Id 49
Consider the following C++ function in which size is the number of elements in the
array E:
The value returned by the function MyX is the
int MyX(int *E, unsigned int size)
{
int Y = 0;
int Z;
int i, j, k;

for (i = 0; i < size; i++)


Y = Y + E[i];

for (i = 0; i < size; i++)


for (j = i; j < size; j++)
{
Question Z = 0;

Page 14
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

for (k = i; k <= j; k++)


Z = Z + E[k];
if (Z > Y)
Y = Z;
}
return Y;
}
A maximum possible sum of elements in any sub-array of array E.
B maximum element in any sub-array of array E.
C sum of the maximum elements in all possible sub-arrays of array E
D the sum of all the elements in the array E.
Answer A
Marks 4
Unit 2

Id 50
If array A is made to hold the string “abcde”, which of the following four test cases
will be successful in exposing the flaw in this procedure?
(1) oldc = "abc", newc = "dab"
(2) oldc = "cde", newc = "bcd"
(3) oldc = "bca", newc = "cda"
Question (4) oldc = "abc", newc = "bac"
A None
B 2 only
C 3 and 4 only
D 4 only
Answer C
Marks 4
Unit 2

Id 51
A program P reads in 500 integers in the range [0..100] representing the scores of
500 students. It then prints the frequency of each score above 50. What would be the
Question best way for P to store the frequencies?
A An array of 50 numbers
B An array of 100 numbers
C An array of 500 numbers
D A dynamically allocated array of 550 numbers
Answer A
Marks 4

Unit 2

Id 52
Consider the following C++ program that attempts to locate an element x in an
array Y[] using binary search. The program is erroneous.
f(int Y[10], int x) {
int i, j, k;
Question i = 0; j = 9;

Page 15
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

do {
k = (i + j) /2;
if( Y[k] < x) i = k; else j = k;
} while(Y[k] != x && i < j);
if(Y[k] == x) cout<<"x is in the array " ;
else cout<<" x is not in the array " ;
}
On which of the following contents of Y and x does the program fail?
A Y is [1 2 3 4 5 6 7 8 9 10] and x < 10
B Y is [1 3 5 7 9 11 13 15 17 19] and x < 1
C Y is [2 2 2 2 2 2 2 2 2 2] and x > 2
D Y is [2 4 6 8 10 12 14 16 18 20] and 2 < x < 20 and x is even
Answer C
Marks 4
Unit 2

Id 53
Consider the following C++ program that attempts to locate an element x in an
array Y[] using binary search. The program is erroneous.
f(int Y[10], int x) {
int i, j, k;
i = 0; j = 9;
do {
k = (i + j) /2;
if( Y[k] < x) i = k; else j = k;
} while(Y[k] != x && i < j);
if(Y[k] == x) cout<<"x is in the array " ;
else cout<<" x is not in the array " ;
}
Question What is the correction needed in the program to make it work properly?
A Change line 6 to: if (Y[k] < x) i = k + 1; else j = k-1;
B Change line 6 to: if (Y[k] < x) i = k - 1; else j = k+1;
C Change line 6 to: if (Y[k] <= x) i = k; else j = k;
D Change line 7 to: } while ((Y[k] == x) && (i < j));
Answer A
Marks 4
Unit 2

Id 54
A set X can be represented by an array x[n] as follows:

Consider the following algorithm in which x,y and z are Boolean arrays of size n:
algorithm zzz(x[] , y[], z [])
{
int i;
for (i=O; i<n; ++i)
z[i] = (x[i] ^ ~y[i]) V (~x[i] ^ y[i])
}
Question The set Z computed by the algorithm is:

Page 16
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

A (X Intersection Y)
B (X Union Y)
C (X-Y) Intersection (Y-X)
D (X-Y) Union (Y-X)
Answer D
Marks 4
Unit 2

Id 55
Question Array name indicates________
A Just the name of array

B Address of starting element


C Value of starting element
D None of the above
Answer B
Marks 1
Unit 2

Id 56
Question The array subscript always start at ________
A 1
B -1
C 0
D Any position
Answer C
Marks 1
Unit 2

Id 57
Question Array elements occupy______
A Varying length of memory locations for each element
B Subsequent memory locations
C Random memory locations
D None of these
Answer B
Marks 1
Unit 2

Id 58
Question In arrays ______ and ______ are difficult but ______ is easy operation.

Page 17
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

A Insertion, deletion, searching


B Searching, insertion, deletion
C Deletion, searching, insertion
D None of these.
Answer A
Marks 2
Unit 2

Id 59
What is the output for following program?
void main()
{
int a[5]={3,4};
cout<<a[2]<<a[3]<<a[4];
Question }
A 211
B Garbage value
C 122
D 000
Answer D
Marks 1
Unit 2

Id 60
What is the output for following program?
void main()
{
int i=0,a[3];
a[i] = i++;
cout<<a[i];
Question }
A Garbage value
B Syntax error
C 1
D 0
Answer A
Marks 1
Unit 2

Id 61
Question In Linked list, the logical order of elements ________
A Is determined by their physical arrangement
B Cannot be determined by their physical arrangement
C Is the same as their physical arrangement
D None of these.

Page 18
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

Answer B
Marks 1
Unit 2

Id 62
Question In CLL, insertion of a record involves modification of……
A 1 pointer
B 2 pointers
C No pointer
D 3 pointers
Answer B
Marks 2
Unit 2

Id 63
Question For traversing a list, which pointer do you need?
A NULL
B Insertion
C Beginning
D Walking
Answer C
Marks 1
Unit 2

Id 64
Question The nth node in SLL, is accessed via ________
A Tail node
B Head node
C (n-1) nodes
D None of these
Answer B
Marks 1
Unit 2

Id 65
What is the output of this c++ code?
void main()
{
int a[2][3] = {1,2,3,4,5}
int i=0,j=0;
for(i=0 ; i<2 ; i++)
for(j=0 ; j<3 ; j++)
Question cout<<a[i][j];

Page 19
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

A 1 2 3 4 5 junk
B 123455
C 123450
D Run time error
Answer C
Marks 2
Unit 2

Id 66
Question Which of the following data structures are indexed structure?
A L
Trees
B Linked list
C Linear arrays
D All of these
Answer B
Marks 1
Unit 2

Id 67
When new data is to be inserted into a data structure, but there is no available space
Question is called ________________
A Overflow
B Saturated
C Houseful
D Underflow
Answer B
Marks 1
Unit

Id 68
Question Array name is ______
A An array variable
B A common name shared by all elements
C A keyword
D Not used in a program
Answer B
Marks 1
Unit 2

Id

Page 20
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

Question To initialize a 5 element array all having value 1 is given by ……


A int num[ ] = (1);
B int num[ ] = {1,1,1,1,1};
C int num[ 5 ] = (1);
D int num[ 4 ] = (1,1,1,1,1);
Answer B
Marks 1
Unit 2

ID 69
Question Missing elements of partially initialized arrays are ………
A Set to zero
B Not defined
C Invalid
D Set to one
Answer C
Marks 1
Unit 2

ID 70
Question Two-way list may be maintained in memory by means of .............
A Queues
B Linear arrays
C Non linear arrays
D Stacks
Answer B
Marks 1
Unit 2

ID 71
Question Sparse matrices have?
A many zero entries
B many non- zero entries
C higher dimension
D none of above
Answer A
Marks 1
Unit 2

ID 72
Question Two dimensional arrays are also called ?

Page 21
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

A Matrix Array
B Table Array
C Both a and b
D None of the Above
Answer C
Marks 1
Unit 2

ID 73
Question Which of the following function sets first n characters of a string to a given character?
A strinit()
B strnset()
C strset()
D strcset()
Answer B
Marks 1
Unit 2

ID 74
Question If the two strings are identical, then strcmp() function returns
A -1
B 1
C 0
D 2
Answer C
Marks 1
Unit 2

ID 75
Question The library function used to find the last occurrence of a character in a string is
A strnstr()
B laststr()
C strrchr()
D strstr()
Answer C
Marks 1
Unit 2

ID 76
Which of the following function is used to find the first occurrence of a given string
Question in another string?
A strchr()

Page 22
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

B strrchr()
C strstr()
D strnset()
Answer C
Marks 1
Unit 2

ID 77
Which of the following function is more appropriate for reading in a multi-word
Question string?
A printf();
B scanf();
C gets();
D puts();
Answer C
Marks 1
Unit 2

ID 78
Question Which of the following function is correct that finds the length of a string?
int xstrlen(char *s)
{
int length=0;
while(*s!='\0')
{ length++; s++; }
return (length);
}
A
int xstrlen(char s)
{
int length=0;
while(*s!='\0')
length++; s++;
return (length);
}
B
int xstrlen(char *s)
{
int length=0;
while(*s!='\0')
length++;
return (length);
}
C
int xstrlen(char *s)
{
int length=0;
while(*s!='\0')
s++;
return (length);
}
D
Answer A
Marks 4
Unit 2

ID 79

Page 23
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

Question An array elements are always stored in ________ memory locations.


A Sequential
B Random
C Sequential and Random
D None of the above
Answer A
Marks 1
Unit 2

ID 80
Question
A
B
C
D
Answer
Marks
Unit 2

ID 81
What will be printed after execution of the following code?
void main()
{
int arr[10] = {1,2,3,4,5};
printf("%d", arr[5]);
Question }
A Garbage Value
B 5
C 6
D 0
Answer D
Marks 1
Unit 2

ID 82
Question What is right way to Initialize array?
A int num[6] = { 21, 41, 2, 15, 4, 5 };
B int n{} = { 21, 41, 2, 15, 4, 5 };
C int n{6} = { 21, 41, 2 };
D int n(6) = { 21, 41, 2, 15, 4, 5 };
Answer A
Marks 1
Unit 2

Page 24
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

ID 83
What will be the output of the following code?\
#include"stdio.h"
void main()
{
int a[10];
printf("%d %d", a[-1], a[12]);
Question }
A 00
B Garbage value 0
C 0 Garbage Value
D Garbage value Garbage Value
Answer D
Marks 2
Unit 2

ID 84
Let x be an array. Which of the following operations are illegal?
1. ++X
2. X+1
3. X++
Question 4. X*2
A I and II
B I, II and III
C II and III
D I, III and IV
Answer D
Marks 2
Unit 2

ID 85
Question What is the maximum number of dimensions an array in C may have?
A 2
B 8
C 20
D Theoretically no limit. The only practical limits are memory size and compilers
Answer D
Marks 1
Unit 2

ID 86
What will be the output of the program?
#include"stdio.h"
int main()
Question {

Page 25
Data Structures & Algorithms , M.C.Q. BANK, FOR UNIT -2 , SECOND YEAR COMP. ENGG. SEM-1, 2016 PATTERN ,
U.O.P.

int arr[5] = {10};


printf("%d", 0[arr]);

return 0;
}
A 1
B 0
C 10
D 6
Answer C
Marks 2
Unit 2

ID
Question
A
B
C
D
Answer
Marks
Unit

ID
Question
A
B
C
D
Answer
Marks
Unit

ID
Question
A
B
C
D
Answer
Marks
Unit

Page 26
3/23/2021 Arrays Questions and Answers - Sanfoundry

Data Structure Questions and Answers – Array


and Array Operations
Next »

This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “Array and
Array Operations”.

1. Which of these best describes an array?


a) A data structure that shows a hierarchical behavior
b) Container of objects of similar types
c) Arrays are immutable once initialised
d) Array is not a data structure

View Answer

Answer: b
Explanation: Array contains elements only of the same type.

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-array-array-operations/ 1/8
3/23/2021 Arrays Questions and Answers - Sanfoundry

2. How do you initialize an array in C?


a) int arr[3] = (1,2,3);
b) int arr(3) = {1,2,3};
c) int arr[3] = {1,2,3};
d) int arr(3) = (1,2,3);

View Answer

Answer: c
Explanation: This is the syntax to initialize an array in C.

3. How do you instantiate an array in Java?


a) int arr[] = new int(3);
b) int arr[];
c) int arr[] = new int[3];
d) int arr() = new int(3);

View Answer

Answer: c
Explanation: Note that int arr[]; is declaration whereas int arr[] = new int[3]; is to instantiate an
array.

4. Which of the following is the correct way to declare a multidimensional array in Java?
a) int[] arr;
b) int arr[[]];
c) int[][]arr;
d) int[[]] arr;

View Answer

Answer: c
Explanation: The syntax to declare multidimensional array in java is either int[][] arr; or int arr[]
[];

5. What is the output of the following Java code?

https://www.sanfoundry.com/data-structure-questions-answers-array-array-operations/ 2/8
3/23/2021 Arrays Questions and Answers - Sanfoundry

advertisement

All 10 Antenna Locations In GTA Online - Cayo Perico Heist

public class array


{
public static void main(String args[])
{
int []arr = {1,2,3,4,5};
System.out.println(arr[2]);
System.out.println(arr[4]);
}
}

a) 3 and 5
b) 5 and 3
c) 2 and 4
d) 4 and 2

View Answer

Answer: a
Explanation: Array indexing starts from 0.

6. What is the output of the following Java code?

public class array


{
public static void main(String args[])
{
int []arr = {1,2,3,4,5};
System.out.println(arr[5]);
}
}

https://www.sanfoundry.com/data-structure-questions-answers-array-array-operations/ 3/8
3/23/2021 Arrays Questions and Answers - Sanfoundry

a) 4
b) 5
c) ArrayIndexOutOfBoundsException
d) InavlidInputException

View Answer

Answer: c
Explanation: Trying to access an element beyond the limits of an array gives
ArrayIndexOutOfBoundsException.

advertisement

7. When does the ArrayIndexOutOfBoundsException occur?


a) Compile-time
b) Run-time
c) Not an error
d) Not an exception at all

View Answer

Answer: b
Explanation: ArrayIndexOutOfBoundsException is a run-time exception and the compilation is
error-free.

8. Which of the following concepts make extensive use of arrays?


a) Binary trees
b) Scheduling of processes
c) Caching
d) Spatial locality

View Answer

https://www.sanfoundry.com/data-structure-questions-answers-array-array-operations/ 4/8
3/23/2021 Arrays Questions and Answers - Sanfoundry

Answer: d
Explanation: Whenever a particular memory location is referred to, it is likely that the locations
nearby are also referred, arrays are stored as contiguous blocks in memory, so if you want to
access array elements, spatial locality makes it to access quickly.

9. What are the advantages of arrays?


a) Objects of mixed data types can be stored
b) Elements in an array cannot be sorted
c) Index of rst element of an array is 1
d) Easier to store elements of same data type

View Answer

Answer: d
Explanation: Arrays store elements of the same data type and present in continuous memory
locations.

10. What are the disadvantages of arrays?


a) Data structure like queue or stack cannot be implemented
b) There are chances of wastage of memory space if elements inserted in an array are lesser
than the allocated size
c) Index value of an array can be negative
d) Elements are sequentially accessed

View Answer

Answer: b
Explanation: Arrays are of xed size. If we insert elements less than the allocated size,
unoccupied positions can’t be used again. Wastage will occur in memory.

11. Assuming int is of 4bytes, what is the size of int arr[15];?


a) 15
b) 19
c) 11
d) 60

View Answer

Answer: d
Explanation: Since there are 15 int elements and each int is of 4bytes, we get 15*4 = 60bytes.

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-array-array-operations/ 5/8
3/23/2021 Arrays Questions and Answers - Sanfoundry

12. In general, the index of the rst element in an array is __________


a) 0
b) -1
c) 2
d) 1

View Answer

Answer: a
Explanation: In general, Array Indexing starts from 0. Thus, the index of the rst element in an
array is 0.

13. Elements in an array are accessed _____________


a) randomly
b) sequentially
c) exponentially
d) logarithmically

View Answer

Answer: a
Explanation: Elements in an array are accessed randomly. In Linked lists, elements are
accessed sequentially.

Sanfoundry Global Education & Learning Series – Data Structure.

To practice all areas of Data Structure, here is complete set of 1000+ Multiple Choice Questions
and Answers.

Participate in the Sanfoundry Certi cation contest to get free Certi cate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest

» Next - Data Structure Questions and Answers – Stack Operations – 1

https://www.sanfoundry.com/data-structure-questions-answers-array-array-operations/ 6/8
3/23/2021 Arrays Questions and Answers - Sanfoundry

advertisement

Recommended Posts:
1. Data Science Questions and Answers
2. Java Programming Examples on Collection API
3. Java Programming Examples on Exception Handling
4. Java Programming Examples on Java.Lang
5. C# Programming Examples on Sorting
6. C Programming Examples on Searching and Sorting
7. Data Structures & Algorithms II – Questions and Answers
8. Java Programming Examples on Combinatorial Problems & Algorithms
9. Java Programming Examples
10. C# Programming Examples on Data Structures
11. Java Programming Examples on Utility Classes
12. C Programming Examples on Arrays
13. C Programming Examples on Stacks & Queues
14. C++ Programming Examples on Data-Structures
15. C Programming Examples on Data-Structures
16. C# Programming Examples on Arrays
17. Java Programming Examples on Arrays
18. Java Programming Examples on Collections
19. Java Programming Examples on Data-Structures
20. Data Structure Questions and Answers

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-array-array-operations/ 7/8
3/23/2021 Arrays Questions and Answers - Sanfoundry

Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is
Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN
Architect and is passionate about competency developments in these areas.
He lives in Bangalore and delivers focused training sessions to IT
professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux
Networking, Linux Storage, Advanced C Programming, SAN Storage
Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber
Channel. Stay connected with him @ LinkedIn

Subscribe Sanfoundry Newsletter and Posts

Name*

Email*

Subscribe

About | Certi cations | Internships | Jobs | Privacy Policy | Terms | Copyright | Contact

     

© 2011-2021 Sanfoundry. All Rights Reserved.

https://www.sanfoundry.com/data-structure-questions-answers-array-array-operations/ 8/8
3/23/2021 Stacks Questions and Answers - Sanfoundry

Data Structure Questions and Answers – Stack


Operations – 1
« Prev Next »

This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “Stack
Operations – 1”.

1. Process of inserting an element in stack is called ____________


a) Create
b) Push
c) Evaluation
d) Pop

View Answer

Answer: b
Explanation: Push operation allows users to insert elements in the stack. If the stack is lled
completely and trying to perform push operation stack – over ow can happen.

advertisement 

https://www.sanfoundry.com/data-structure-questions-answers-stack-operations/ 1/7
3/23/2021 Stacks Questions and Answers - Sanfoundry

2. Process of removing an element from stack is called __________


a) Create
b) Push
c) Evaluation
d) Pop

View Answer

Answer: d
Explanation: Elements in the stack are removed using pop operation. Pop operation removes
the top most element in the stack i.e. last entered element.

3. In a stack, if a user tries to remove an element from an empty stack it is called _________
a) Under ow
b) Empty collection
c) Over ow
d) Garbage Collection

View Answer

Answer: a
Explanation: Under ow occurs when the user performs a pop operation on an empty stack.
Over ow occurs when the stack is full and the user performs a push operation. Garbage
Collection is used to recover the memory occupied by objects that are no longer used.

4. Pushing an element into stack already having ve elements and stack size of 5, then stack
becomes ___________
a) Over ow
b) Crash
c) Under ow
d) User ow

View Answer

Answer: a
Explanation: The stack is lled with 5 elements and pushing one more element causes a stack
https://www.sanfoundry.com/data-structure-questions-answers-stack-operations/ 2/7
3/23/2021 Stacks Questions and Answers - Sanfoundry

over ow. This results in overwriting memory, code and loss of unsaved work on the computer.

5. Entries in a stack are “ordered”. What is the meaning of this statement?


a) A collection of stacks is sortable
b) Stack entries may be compared with the ‘<‘ operation
c) The entries are stored in a linked list
d) There is a Sequential entry that is one by one

View Answer

Answer: d
Explanation: In stack data structure, elements are added one by one using push operation.
Stack follows LIFO Principle i.e. Last In First Out(LIFO).

advertisement

All 10 Antenna Locations In GTA Online - Cayo Perico Heist

6. Which of the following is not the application of stack?


a) A parentheses balancing program
b) Tracking of local variables at run time
c) Compiler Syntax Analyzer
d) Data Transfer between two asynchronous process

View Answer

Answer: d
Explanation: Data transfer between the two asynchronous process uses the queue data
structure for synchronisation. The rest are all stack applications. 

7. Consider the usual algorithm for determining whether a sequence of parentheses is balanced.
The maximum number of parentheses that appear on the stack AT ANY ONE TIME when the
algorithm analyzes: (()(())(()))?
https://www.sanfoundry.com/data-structure-questions-answers-stack-operations/ 3/7
3/23/2021 Stacks Questions and Answers - Sanfoundry

a) 1
b) 2
c) 3
d) 4 or more

View Answer

Answer: c
Explanation: In the entire parenthesis balancing method when the incoming token is a left
parenthesis it is pushed into stack. A right parenthesis makes pop operation to delete the
elements in stack till we get left parenthesis as top most element. 3 elements are there in
stack before right parentheses comes. Therefore, maximum number of elements in stack at
run time is 3.

8. Consider the usual algorithm for determining whether a sequence of parentheses is balanced.
Suppose that you run the algorithm on a sequence that contains 2 left parentheses and 3 right
parentheses (in some order). The maximum number of parentheses that appear on the stack AT
ANY ONE TIME during the computation?
a) 1
b) 2
c) 3
d) 4 or more

View Answer

Answer: b
Explanation: In the entire parenthesis balancing method when the incoming token is a left
parenthesis it is pushed into stack. A right parenthesis makes pop operation to delete the
elements in stack till we get left parenthesis as top most element. 2 left parenthesis are
pushed whereas one right parenthesis removes one of left parenthesis. 2 elements are there
before right parenthesis which is the maximum number of elements in stack at run time.

9. What is the value of the post x expression 6 3 2 4 + – *?


a) 1
b) 40
c) 74
d) -18

View Answer

Answer: d
Explanation: Post x Expression is (6*(3-(2+4))) which results -18 as output.


advertisement

https://www.sanfoundry.com/data-structure-questions-answers-stack-operations/ 4/7
3/23/2021 Stacks Questions and Answers - Sanfoundry

10. Here is an in x expression: 4 + 3*(6*3-12). Suppose that we are using the usual stack
algorithm to convert the expression from in x to post x notation. The maximum number of
symbols that will appear on the stack AT ONE TIME during the conversion of this expression?
a) 1
b) 2
c) 3
d) 4

View Answer

Answer: d
Explanation: When we perform the conversion from in x to post x expression +, *, (, *
symbols are placed inside the stack. A maximum of 4 symbols are identi ed during the entire
conversion.

Sanfoundry Global Education & Learning Series – Data Structure.

To practice all areas of Data Structure, here is complete set of 1000+ Multiple Choice Questions
and Answers.

Participate in the Sanfoundry Certi cation contest to get free Certi cate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest

« Prev - Data Structure Questions and Answers – Array and Array Operations
» Next - Data Structure Questions and Answers – Stack Operations – 2

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-stack-operations/ 5/7
3/23/2021 Stacks Questions and Answers - Sanfoundry

Recommended Posts:
1. Data Science Questions and Answers
2. Java Programming Examples on Graph Problems & Algorithms
3. C# Programming Examples on Conversions
4. C Programming Examples on Searching and Sorting
5. Java Programming Examples on Collections
6. C++ Programming Examples on Graph Problems & Algorithms
7. C Programming Examples on Arrays
8. C Programming Examples on Linked List
9. Python Programming Examples on Linked Lists
10. C Programming Examples on Graph Problems & Algorithms
11. C# Programming Examples on Sorting
12. C# Programming Examples on Exceptions
13. Data Structures & Algorithms II – Questions and Answers
14. Python Programming Examples on Stacks & Queues
15. C++ Programming Examples on Data-Structures
16. C Programming Examples on Data-Structures
17. Java Programming Examples on Data-Structures
18. C Programming Examples on Stacks & Queues
19. C# Programming Examples on Data Structures
20. Data Structure Questions and Answers

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-stack-operations/ 6/7
3/23/2021 Stacks Questions and Answers - Sanfoundry

Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is
Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN
Architect and is passionate about competency developments in these areas.
He lives in Bangalore and delivers focused training sessions to IT
professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux
Networking, Linux Storage, Advanced C Programming, SAN Storage
Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber
Channel. Stay connected with him @ LinkedIn

Subscribe Sanfoundry Newsletter and Posts

Name*

Email*

Subscribe

About | Certi cations | Internships | Jobs | Privacy Policy | Terms | Copyright | Contact

     

© 2011-2021 Sanfoundry. All Rights Reserved.

https://www.sanfoundry.com/data-structure-questions-answers-stack-operations/ 7/7
3/23/2021 Data Structure Questions and Answers for Freshers - Sanfoundry

Data Structure Questions and Answers – Stack


Operations – 3
« Prev Next »

This set of Data Structure Questions and Answers for Freshers focuses on “Stack Operations – 3”.

1. The result of evaluating the post x expression 5, 4, 6, +, *, 4, 9, 3, /, +, * is?


a) 600
b) 350
c) 650
d) 588

View Answer

Answer: b
Explanation: The post x expression is evaluated using stack. We will get the in x expression as
(5*(4+6))*(4+9/3). On solving the In x Expression, we get
(5*(10))*(4+3)
= 50*7
= 350. 

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-freshers/ 1/7
3/23/2021 Data Structure Questions and Answers for Freshers - Sanfoundry

2. Convert the following in x expressions into its equivalent post x expressions.


(A + B ⋀D)/(E – F)+G
a) (A B D ⋀ + E F – / G +)
b) (A B D +⋀ E F – / G +)
c) (A B D ⋀ + E F/- G +)
d) (A B D E F + ⋀ / – G +)

View Answer

Answer: a
Explanation: The given in x expression is (A + B ⋀D)/(E – F)+G.
(A B D ^ + ) / (E – F) +G
(A B D ^ + E F – ) + G. ‘/’ is present in stack.
A B D ^ + E F – / G +. Thus Post x Expression is A B D ^ + E F – / G +.

3. Convert the following In x expression to Post x form using a stack.


x + y * z + (p * q + r) * s, Follow usual precedence rule and assume that the expression is legal.
a) xyz*+pq*r+s*+
b) xyz*+pq*r+s+*
c) xyz+*pq*r+s*+
d) xyzp+**qr+s*+

View Answer

Answer: a
Explanation: The In x Expression is x + y * z + (p * q + r) * s.
(x y z ) + (p * q + r) * s. ‘+’, ‘*’ are present in stack.
(x y z * + p q * r) * s. ‘+’ is present in stack.
x y z * + p q * r + s * +. Thus Post x Expression is x y z * + p q * r + s * +.

4. Which of the following statement(s) about stack data structure is/are NOT correct?
a) Linked List are used for implementing Stacks
b) Top of the Stack always contain the new node

https://www.sanfoundry.com/data-structure-questions-answers-freshers/ 2/7
3/23/2021 Data Structure Questions and Answers for Freshers - Sanfoundry

c) Stack is the FIFO data structure


d) Null link is present in the last node at the bottom of the stack

View Answer

Answer: c
Explanation: Stack follows LIFO.

5. Consider the following operation performed on a stack of size 5.

Push(1);
Pop();
Push(2);
Push(3);
Pop();
Push(4);
Pop();
Pop();
Push(5);

advertisement

All 10 Antenna Locations In GTA Online - Cayo Perico Heist

After the completion of all operation, the number of elements present in stack is?
a) 1
b) 2
c) 3 
d) 4

View Answer

https://www.sanfoundry.com/data-structure-questions-answers-freshers/ 3/7
3/23/2021 Data Structure Questions and Answers for Freshers - Sanfoundry

Answer: a
Explanation: Number of elements present in stack is equal to the di erence between number
of push operations and number of pop operations. Number of elements is 5-4=1.

6. Which of the following is not an inherent application of stack?


a) Reversing a string
b) Evaluation of post x expression
c) Implementation of recursion
d) Job scheduling

View Answer

Answer: d
Explanation: Job Scheduling is not performed using stacks.

7. The type of expression in which operator succeeds its operands is?


a) In x Expression
b) Pre x Expression
c) Post x Expression
d) Both Pre x and Post x Expressions

View Answer

Answer: c
Explanation: The expression in which operator succeeds its operands is called post x
expression. The expression in which operator precedes the operands is called pre x
expression. If an operator is present between two operands, then it is called in x expressions.

8. Assume that the operators +,-, X are left associative and ^ is right associative. The order of
precedence (from highest to lowest) is ^, X, +, -. The post x expression for the in x expression a
+ b X c – d ^ e ^ f is?
a) abc X+ def ^^ –
b) abc X+ de^f^ –
c) ab+c Xd – e ^f^
d) -+aXbc^ ^def

View Answer

Answer: b
Explanation: Given In x Expression is a + b X c – d ^ e ^ f.
(a b c X +) (d ^ e ^ f). ‘–‘ is present in stack.
(a b c X + d e ^ f ^ -). Thus the nal expression is (a b c X + d e ^ f ^ -).

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-freshers/ 4/7
3/23/2021 Data Structure Questions and Answers for Freshers - Sanfoundry

9. If the elements “A”, “B”, “C” and “D” are placed in a stack and are deleted one at a time, what is
the order of removal?
a) ABCD
b) DCBA
c) DCAB
d) ABDC

View Answer

Answer: b
Explanation: Stack follows LIFO(Last In First Out). So the removal order of elements are DCBA.

Sanfoundry Global Education & Learning Series – Data Structure.

To practice all areas of Data Structure for Freshers, here is complete set of 1000+ Multiple Choice
Questions and Answers.

Participate in the Sanfoundry Certi cation contest to get free Certi cate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest

« Prev - Data Structure Questions and Answers – Stack Operations – 2


» Next - Data Structure Questions and Answers – Queue Operations

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-freshers/ 5/7
3/23/2021 Data Structure Questions and Answers for Freshers - Sanfoundry

Recommended Posts:
1. Compilers Questions and Answers
2. C Programming Examples on Linked List
3. Automata Theory Questions and Answers
4. Java Programming Examples on Graph Problems & Algorithms
5. Python Programming Examples on Linked Lists
6. C++ Programming Examples on Graph Problems & Algorithms
7. Petroleum Production Operations Questions and Answers
8. C Tutorials
9. Data Structures & Algorithms II – Questions and Answers
10. C Programming Examples on Bitwise Operations
11. C Programming Examples on Graph Problems & Algorithms
12. Data Science Questions and Answers
13. C++ Programming Examples on Data-Structures
14. Python Programming Examples on Stacks & Queues
15. Java Programming Examples on Data-Structures
16. C Programming Examples on Data-Structures
17. C# Programming Examples on Conversions
18. C Programming Examples on Stacks & Queues
19. C# Programming Examples on Data Structures
20. Data Structure Questions and Answers

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-freshers/ 6/7
3/23/2021 Data Structure Questions and Answers for Freshers - Sanfoundry

Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is
Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN
Architect and is passionate about competency developments in these areas.
He lives in Bangalore and delivers focused training sessions to IT
professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux
Networking, Linux Storage, Advanced C Programming, SAN Storage
Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber
Channel. Stay connected with him @ LinkedIn

Subscribe Sanfoundry Newsletter and Posts

Name*

Email*

Subscribe

About | Certi cations | Internships | Jobs | Privacy Policy | Terms | Copyright | Contact

     

© 2011-2021 Sanfoundry. All Rights Reserved.

https://www.sanfoundry.com/data-structure-questions-answers-freshers/ 7/7
3/23/2021 Queues Questions and Answers - Sanfoundry

Data Structure Questions and Answers –


Queue Operations
« Prev Next »

This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “Queue
Operations”.

1. A linear list of elements in which deletion can be done from one end (front) and insertion can
take place only at the other end (rear) is known as _____________
a) Queue
b) Stack
c) Tree
d) Linked list

View Answer

Answer: a
Explanation: Linear list of elements in which deletion is done at front side and insertion at rear
side is called Queue. In stack we will delete the last entered element rst.

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-queue-operations/ 1/7
3/23/2021 Queues Questions and Answers - Sanfoundry

2. The data structure required for Breadth First Traversal on a graph is?
a) Stack
b) Array
c) Queue
d) Tree

View Answer

Answer: c
Explanation: In Breadth First Search Traversal, BFS, starting vertex is rst taken and adjacent
vertices which are unvisited are also taken. Again, the rst vertex which was added as an
unvisited adjacent vertex list will be considered to add further unvisited vertices of the graph.
To get the rst unvisited vertex we need to follows First In First Out principle. Queue uses FIFO
principle.

3. A queue follows __________


a) FIFO (First In First Out) principle
b) LIFO (Last In First Out) principle
c) Ordered array
d) Linear tree

View Answer

Answer: a
Explanation: Element rst added in queue will be deleted rst which is FIFO principle.

4. Circular Queue is also known as ________


a) Ring Bu er
b) Square Bu er
c) Rectangle Bu er

d) Curve Bu er

View Answer

https://www.sanfoundry.com/data-structure-questions-answers-queue-operations/ 2/7
3/23/2021 Queues Questions and Answers - Sanfoundry

Answer: a
Explanation: Circular Queue is also called as Ring Bu er. Circular Queue is a linear data
structure in which last position is connected back to the rst position to make a circle. It forms
a ring structure.

advertisement

All 10 Antenna Locations In GTA Online - Cayo Perico Heist

5. If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in
what order will they be removed?
a) ABCD
b) DCBA
c) DCAB
d) ABDC

View Answer

Answer: a
Explanation: Queue follows FIFO approach. i.e. First in First Out Approach. So, the order of
removal elements are ABCD.

6. A data structure in which elements can be inserted or deleted at/from both ends but not in
the middle is?
a) Queue
b) Circular queue
c) Dequeue
d) Priority queue

View Answer

Answer: c
Explanation: In dequeuer, we can insert or delete elements from both the ends. In queue, we

https://www.sanfoundry.com/data-structure-questions-answers-queue-operations/ 3/7
3/23/2021 Queues Questions and Answers - Sanfoundry

will follow rst in rst out principle for insertion and deletion of elements. Element with least
priority will be deleted in a priority queue.

7. A normal queue, if implemented using an array of size MAX_SIZE, gets full when?
a) Rear = MAX_SIZE – 1
b) Front = (rear + 1)mod MAX_SIZE
c) Front = rear + 1
d) Rear = front

View Answer

Answer: a
Explanation: When Rear = MAX_SIZE – 1, there will be no space left for the elements to be
added in queue. Thus queue becomes full.

advertisement

8. Queues serve major role in ______________


a) Simulation of recursion
b) Simulation of arbitrary linked list
c) Simulation of limited resource allocation
d) Simulation of heap sort

View Answer

Answer: c
Explanation: Simulation of recursion uses stack data structure. Simulation of arbitrary linked
lists uses linked lists. Simulation of resource allocation uses queue as rst entered data needs

to be given rst priority during resource allocation. Simulation of heap sort uses heap data
structure.

https://www.sanfoundry.com/data-structure-questions-answers-queue-operations/ 4/7
3/23/2021 Queues Questions and Answers - Sanfoundry

9. Which of the following is not the type of queue?


a) Ordinary queue
b) Single ended queue
c) Circular queue
d) Priority queue

View Answer

Answer: b
Explanation: Queue always has two ends. So, single ended queue is not the type of queue.

Sanfoundry Global Education & Learning Series – Data Structure.

advertisement

To practice all areas of Data Structure, here is complete set of 1000+ Multiple Choice Questions
and Answers.

Participate in the Sanfoundry Certi cation contest to get free Certi cate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest

« Prev - Data Structure Questions and Answers – Stack Operations – 3


» Next - Data Structure Questions and Answers – Singly Linked List Operations – 1

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-queue-operations/ 5/7
3/23/2021 Queues Questions and Answers - Sanfoundry

Recommended Posts:
1. Java Programming Examples on Collections
2. C Programming Examples using Recursion
3. C++ Programming Examples on Graph Problems & Algorithms
4. C++ Algorithms, Problems & Programming Examples
5. C Programming Examples without using Recursion
6. C Algorithms, Problems & Programming Examples
7. Java Algorithms, Problems & Programming Examples
8. C Programming Examples
9. Data Science Questions and Answers
10. C++ Programming Examples on STL
11. Data Structures & Algorithms II – Questions and Answers
12. Python Programming Examples on Stacks & Queues
13. C Programming Examples on Linked List
14. C Programming Examples on Stacks & Queues
15. Python Programming Examples on Linked Lists
16. C Programming Examples on Data-Structures
17. C++ Programming Examples on Data-Structures
18. C# Programming Examples on Data Structures
19. Java Programming Examples on Data-Structures
20. Data Structure Questions and Answers

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-queue-operations/ 6/7
3/23/2021 Queues Questions and Answers - Sanfoundry

Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is
Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN
Architect and is passionate about competency developments in these areas.
He lives in Bangalore and delivers focused training sessions to IT
professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux
Networking, Linux Storage, Advanced C Programming, SAN Storage
Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber
Channel. Stay connected with him @ LinkedIn

Subscribe Sanfoundry Newsletter and Posts

Name*

Email*

Subscribe

About | Certi cations | Internships | Jobs | Privacy Policy | Terms | Copyright | Contact

     

© 2011-2021 Sanfoundry. All Rights Reserved.

https://www.sanfoundry.com/data-structure-questions-answers-queue-operations/ 7/7
3/23/2021 Singly Linked Lists Interview Questions and Answers - Sanfoundry

Data Structure Questions and Answers – Singly


Linked List Operations – 1
« Prev Next »

This set of Data Structure Interview Questions & Answers focuses on “Singly Linked List
Operations – 1”.

1. A linear collection of data elements where the linear node is given by means of pointer is
called?
a) Linked list
b) Node list
c) Primitive list
d) Unordered list

View Answer

Answer: a
Explanation: In Linked list each node has its own data and the address of next node. These
nodes are linked by using pointers. Node list is an object that consists of a list of all nodes in a
document with in a particular selected set of nodes. 

advertisement

https://www.sanfoundry.com/data-structure-interview-questions-answers-single-linked-lists/ 1/8
3/23/2021 Singly Linked Lists Interview Questions and Answers - Sanfoundry

2. Consider an implementation of unsorted singly linked list. Suppose it has its representation
with a head pointer only. Given the representation, which of the following operation can be
implemented in O(1) time?

i) Insertion at the front of the linked list


ii) Insertion at the end of the linked list
iii) Deletion of the front node of the linked list
iv) Deletion of the last node of the linked list

a) I and II
b) I and III
c) I, II and III
d) I, II and IV

View Answer

Answer: b
Explanation: We know the head node in the given linked list. Insertion and deletion of
elements at the front of the linked list completes in O (1) time whereas for insertion and
deletion at the last node requires to traverse through every node in the linked list. Suppose
there are n elements in a linked list, we need to traverse through each node. Hence time
complexity becomes O(n).

3. In linked list each node contains a minimum of two elds. One eld is data eld to store the
data second eld is?
a) Pointer to character
b) Pointer to integer
c) Pointer to node
d) Node

View Answer

Answer: c
Explanation: Each node in a linked list contains data and a pointer (reference) to the next
https://www.sanfoundry.com/data-structure-interview-questions-answers-single-linked-lists/ 2/8
3/23/2021 Singly Linked Lists Interview Questions and Answers - Sanfoundry

node. Second eld contains pointer to node.

advertisement

All 10 Antenna Locations In GTA Online - Cayo Perico Heist

4. What would be the asymptotic time complexity to add a node at the end of singly linked list, if
the pointer is initially pointing to the head of the list?
a) O(1)
b) O(n)
c) θ(n)
d) θ(1)

View Answer

Answer: c
Explanation: In case of a linked list having n elements, we need to travel through every node of
the list to add the element at the end of the list. Thus asymptotic time complexity is θ(n).

5. What would be the asymptotic time complexity to insert an element at the front of the linked
list (head is known)?
a) O(1)
b) O(n)
c) O(n2)
d) O(n3)

View Answer

Answer: a 
Explanation: To add an element at the front of the linked list, we will create a new node which
holds the data to be added to the linked list and pointer which points to head position in the
linked list. The entire thing happens within O (1) time. Thus the asymptotic time complexity is
O (1).

https://www.sanfoundry.com/data-structure-interview-questions-answers-single-linked-lists/ 3/8
3/23/2021 Singly Linked Lists Interview Questions and Answers - Sanfoundry

6. What would be the asymptotic time complexity to nd an element in the linked list?
a) O(1)
b) O(n)
c) O(n2)
d) O(n4)

View Answer

Answer: b
Explanation: If the required element is in the last position, we need to traverse the entire
linked list. This will take O (n) time to search the element.

7. What would be the asymptotic time complexity to insert an element at the second position in
the linked list?
a) O(1)
b) O(n)
c) O(n2)
d) O(n3)

View Answer

Answer: a
Explanation: A new node is created with the required element. The pointer of the new node
points the node to which the head node of the linked list is also pointing. The head node
pointer is changed and it points to the new node which we created earlier. The entire process
completes in O (1) time. Thus the asymptotic time complexity to insert an element in the
second position of the linked list is O (1).

advertisement

8. The concatenation of two lists can be performed in O(1) time. Which of the following variation
of the linked list can be used?

https://www.sanfoundry.com/data-structure-interview-questions-answers-single-linked-lists/ 4/8
3/23/2021 Singly Linked Lists Interview Questions and Answers - Sanfoundry

a) Singly linked list


b) Doubly linked list
c) Circular doubly linked list
d) Array implementation of list

View Answer

Answer: c
Explanation: We can easily concatenate two lists in O (1) time using singly or doubly linked list,
provided that we have a pointer to the last node at least one of the lists. But in case of circular
doubly linked lists, we will break the link in both the lists and hook them together. Thus
circular doubly linked list concatenates two lists in O (1) time.

9. Consider the following de nition in c programming language.

struct node
{
int data;
struct node * next;
}
typedef struct node NODE;
NODE *ptr;

Which of the following c code is used to create new node?


a) ptr = (NODE*)malloc(sizeof(NODE));
b) ptr = (NODE*)malloc(NODE);
c) ptr = (NODE*)malloc(sizeof(NODE*));
d) ptr = (NODE)malloc(sizeof(NODE));

View Answer

Answer: a
Explanation: As it represents the right way to create a node.

advertisement

https://www.sanfoundry.com/data-structure-interview-questions-answers-single-linked-lists/ 5/8
3/23/2021 Singly Linked Lists Interview Questions and Answers - Sanfoundry

Sanfoundry Global Education & Learning Series – Data Structure.

To practice all areas of Data Structure for Interviews, here is complete set of 1000+ Multiple
Choice Questions and Answers.

Participate in the Sanfoundry Certi cation contest to get free Certi cate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest

« Prev - Data Structure Questions and Answers – Queue Operations


» Next - Data Structure Questions and Answers – Singly Linked List Operations – 2

advertisement

Recommended Posts:
1. Python Programming Examples
2. Java Programming Examples on Collections
3. Home
4. C Programming Examples on Trees
5. C++ Programming Examples on Combinatorial Problems & Algorithms
6. C Programming Examples using Recursion
7. Java Programming Examples on Combinatorial Problems & Algorithms
8. C Programming Examples on Stacks & Queues
9. Data Science Questions and Answers 
10. C Tutorials
11. C Programming Examples on Combinatorial Problems & Algorithms
12. Data Structures & Algorithms II – Questions and Answers
13. C Programming Examples without using Recursion

https://www.sanfoundry.com/data-structure-interview-questions-answers-single-linked-lists/ 6/8
3/23/2021 Singly Linked Lists Interview Questions and Answers - Sanfoundry

14. C# Programming Examples on Data Structures


15. Java Programming Examples on Data-Structures
16. C Programming Examples on Data-Structures
17. C++ Programming Examples on Data-Structures
18. Data Structure Questions and Answers
19. Python Programming Examples on Linked Lists
20. C Programming Examples on Linked List

advertisement

Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is
Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN
Architect and is passionate about competency developments in these areas.
He lives in Bangalore and delivers focused training sessions to IT
professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux
Networking, Linux Storage, Advanced C Programming, SAN Storage
Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber
Channel. Stay connected with him @ LinkedIn

Subscribe Sanfoundry Newsletter and Posts

Name*

Email*

Subscribe

https://www.sanfoundry.com/data-structure-interview-questions-answers-single-linked-lists/ 7/8
3/23/2021 Singly Linked Lists Interview Questions and Answers - Sanfoundry

About | Certi cations | Internships | Jobs | Privacy Policy | Terms | Copyright | Contact

     

© 2011-2021 Sanfoundry. All Rights Reserved.

https://www.sanfoundry.com/data-structure-interview-questions-answers-single-linked-lists/ 8/8
3/23/2021 Data Structure Interview Questions and Answers for Freshers - Sanfoundry

Data Structure Questions and Answers – Singly


Linked List Operations – 2
« Prev Next »

This set of Data Structure Interview Questions and Answers for freshers focuses on “Singly
Linked Lists Operations – 2”.

1. What kind of linked list is best to answer questions like “What is the item at position n?”
a) Singly linked list
b) Doubly linked list
c) Circular linked list
d) Array implementation of linked list

View Answer

Answer: d
Explanation: Arrays provide random access to elements by providing the index value within
square brackets. In the linked list, we need to traverse through each element until we reach
the nth position. Time taken to access an element represented in arrays is less than the singly,
doubly and circular linked lists. Thus, array implementation is used to access the item at the
position n.

advertisement

https://www.sanfoundry.com/data-structure-interview-questions-answers-freshers/ 1/7
3/23/2021 Data Structure Interview Questions and Answers for Freshers - Sanfoundry

2. Linked lists are not suitable for the implementation of ___________


a) Insertion sort
b) Radix sort
c) Polynomial manipulation
d) Binary search

View Answer

Answer: d
Explanation: It cannot be implemented using linked lists.

3. Linked list is considered as an example of ___________ type of memory allocation.


a) Dynamic
b) Static
c) Compile time
d) Heap

View Answer

Answer: a
Explanation: As memory is allocated at the run time.

4. In Linked List implementation, a node carries information regarding ___________


a) Data
b) Link
c) Data and Link
d) Node

View Answer

Answer: b
Explanation: A linked list is a collection of objects linked together by references from an object
to another object. By convention these objects are names as nodes. Linked list consists of
https://www.sanfoundry.com/data-structure-interview-questions-answers-freshers/ 2/7
3/23/2021 Data Structure Interview Questions and Answers for Freshers - Sanfoundry

nodes where each node contains one or more data elds and a reference(link) to the next
node.

5. Linked list data structure o ers considerable saving in _____________


a) Computational Time
b) Space Utilization
c) Space Utilization and Computational Time
d) Speed Utilization

View Answer

Answer: c
Explanation: Linked lists saves both space and time.

advertisement

All 10 Antenna Locations In GTA Online - Cayo Perico Heist

6. Which of the following points is/are not true about Linked List data structure when it is
compared with an array?
a) Arrays have better cache locality that can make them better in terms of performance
b) It is easy to insert and delete elements in Linked List
c) Random access is not allowed in a typical implementation of Linked Lists
d) Access of elements in linked list takes less time than compared to arrays

View Answer

Answer: d
Explanation: To access an element in a linked list, we need to traverse every element until we
reach the desired element. This will take more time than arrays as arrays provide random
access to its elements.

7. What does the following function do for a given Linked List with rst node as head?
https://www.sanfoundry.com/data-structure-interview-questions-answers-freshers/ 3/7
3/23/2021 Data Structure Interview Questions and Answers for Freshers - Sanfoundry

void fun1(struct node* head)


{
if(head == NULL)
return;
fun1(head->next);
printf("%d ", head->data);
}

a) Prints all nodes of linked lists


b) Prints all nodes of linked list in reverse order
c) Prints alternate nodes of Linked List
d) Prints alternate nodes in reverse order

View Answer

Answer: b
Explanation: fun1() prints the given Linked List in reverse manner.
For Linked List 1->2->3->4->5, fun1() prints 5->4->3->2->1.

advertisement

8. Which of the following sorting algorithms can be used to sort a random linked list with
minimum time complexity?
a) Insertion Sort
b) Quick Sort
c) Heap Sort
d) Merge Sort

View Answer

Answer: d
Explanation: Both Merge sort and Insertion sort can be used for linked lists. The slow random-
access performance of a linked list makes other algorithms (such as quicksort) perform poorly,

https://www.sanfoundry.com/data-structure-interview-questions-answers-freshers/ 4/7
3/23/2021 Data Structure Interview Questions and Answers for Freshers - Sanfoundry

and others (such as heapsort) completely impossible. Since worst case time complexity of
Merge Sort is O(nLogn) and Insertion sort is O(n2), merge sort is preferred.

Sanfoundry Global Education & Learning Series – Data Structure.

To practice all areas of Data Structure for Interviews, here is complete set of 1000+ Multiple
Choice Questions and Answers.

Participate in the Sanfoundry Certi cation contest to get free Certi cate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest

« Prev - Data Structure Questions and Answers – Singly Linked List Operations – 1
» Next - Data Structure Questions and Answers – Singly Linked List Operations – 3

advertisement

Recommended Posts:
1. Java Programming Examples on Collections
2. C Programming Examples on Searching and Sorting
3. Data Structures & Algorithms II – Questions and Answers
4. C Programming Examples on Arrays
5. C# Programming Examples on Sorting
6. C Programming Examples on Trees
7. C Programming Examples
8. C Programming Examples on Stacks & Queues
9. Java Programming Examples on Combinatorial Problems & Algorithms
10. C++ Programming Examples on Combinatorial Problems & Algorithms
11. C Programming Examples without using Recursion
12. C Programming Examples using Recursion

https://www.sanfoundry.com/data-structure-interview-questions-answers-freshers/ 5/7
3/23/2021 Data Structure Interview Questions and Answers for Freshers - Sanfoundry

13. C# Programming Examples on Data Structures


14. C Programming Examples on Combinatorial Problems & Algorithms
15. Java Programming Examples on Data-Structures
16. C Programming Examples on Data-Structures
17. C++ Programming Examples on Data-Structures
18. Data Structure Questions and Answers
19. Python Programming Examples on Linked Lists
20. C Programming Examples on Linked List

advertisement

Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is
Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN
Architect and is passionate about competency developments in these areas.
He lives in Bangalore and delivers focused training sessions to IT
professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux
Networking, Linux Storage, Advanced C Programming, SAN Storage
Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber
Channel. Stay connected with him @ LinkedIn

Subscribe Sanfoundry Newsletter and Posts

Name*

Email*

Subscribe

https://www.sanfoundry.com/data-structure-interview-questions-answers-freshers/ 6/7
3/23/2021 Data Structure Interview Questions and Answers for Freshers - Sanfoundry

About | Certi cations | Internships | Jobs | Privacy Policy | Terms | Copyright | Contact

     

© 2011-2021 Sanfoundry. All Rights Reserved.

https://www.sanfoundry.com/data-structure-interview-questions-answers-freshers/ 7/7
3/23/2021 Data Structure Questions and Answers for Experienced - Sanfoundry

Data Structure Questions and Answers – Singly


Linked List Operations – 3
« Prev Next »

This set of Data Structure Questions and Answers for Experienced people focuses on “Singly
Linked Lists Operations – 3”.

1. The following function reverse() is supposed to reverse a singly linked list. There is one line
missing at the end of the function.

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-experienced/ 1/9
3/23/2021 Data Structure Questions and Answers for Experienced - Sanfoundry

/* Link list node */


struct node
{
int data;
struct node* next;
};

/* head_ref is a double pointer which points to head (or start) pointer


of linked list */
static void reverse(struct node** head_ref)
{
struct node* prev = NULL;
struct node* current = *head_ref;
struct node* next;
while (current != NULL)
{
next = current->next;
current->next = prev;
prev = current;
current = next;
}
/*ADD A STATEMENT HERE*/
}

What should be added in place of “/*ADD A STATEMENT HERE*/”, so that the function correctly
reverses a linked list.
a) *head_ref = prev;
b) *head_ref = current;
c) *head_ref = next;
d) *head_ref = NULL;

View Answer

Answer: a
Explanation: *head_ref = prev; At the end of while loop, the prev pointer points to the last
node of original linked list.
We need to change *head_ref so that the head pointer now starts pointing to the last node.

2. What is the output of following function for start pointing to rst node of following linked list?

1->2->3->4->5->6
void fun(struct node* start)
{
if(start == NULL)
return;
printf("%d ", start->data);

https://www.sanfoundry.com/data-structure-questions-answers-experienced/ 2/9
3/23/2021 Data Structure Questions and Answers for Experienced - Sanfoundry

if(start->next != NULL )
fun(start->next->next);
printf("%d ", start->data);
}

a) 1 4 6 6 4 1
b) 1 3 5 1 3 5
c) 1 2 3 5
d) 1 3 5 5 3 1

View Answer

Answer: d
Explanation: fun() prints alternate nodes of the given Linked List, rst from head to end, and
then from end to head.
If Linked List has even number of nodes, then skips the last node.

advertisement
Dainsleif questions and answers in Genshin Impact

3. The following C function takes a simply-linked list as an input argument. It modi es the list by
moving the last element to the front of the list and returns the modi ed list. Some part of the
code is left blank. Choose the correct alternative to replace the blank line.

typedef struct node


{
int value;
struct node *next;
}Node;

Node *move_to_front(Node *head)


{
Node *p, *q;

https://www.sanfoundry.com/data-structure-questions-answers-experienced/ 3/9
3/23/2021 Data Structure Questions and Answers for Experienced - Sanfoundry

if ((head == NULL: || (head->next == NULL))


return head;
q = NULL; p = head;
while (p-> next !=NULL)
{
q = p;
p = p->next;
}
_______________________________
return head;
}

a) q = NULL; p->next = head; head = p;


b) q->next = NULL; head = p; p->next = head;
c) head = p; p->next = q; q->next = NULL;
d) q->next = NULL; p->next = head; head = p;

View Answer

Answer: d
Explanation: When while loop completes its execution, node ‘p’ refers to the last node whereas
the ‘q’ node refers to the node before ‘p’ in the linked list. q->next=NULL makes q as the last
node. p->next=head places p as the rst node. the head must be modi ed to ‘p’ as ‘p’ is the
starting node of the list (head=p). Thus the sequence of steps are q->next=NULL, p-
>next=head, head=p.

4. The following C function takes a single-linked list of integers as a parameter and rearranges
the elements of the list. The function is called with the list containing the integers 1, 2, 3, 4, 5, 6, 7
in the given order. What will be the contents of the list after the function completes execution?

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-experienced/ 4/9
3/23/2021 Data Structure Questions and Answers for Experienced - Sanfoundry

struct node
{
int value;
struct node *next;
};
void rearrange(struct node *list)
{
struct node *p, * q;
int temp;
if ((!list) || !list->next)
return;
p = list;
q = list->next;
while(q)
{
temp = p->value;
p->value = q->value;
q->value = temp;
p = q->next;
q = p?p->next:0;
}
}

a) 1, 2, 3, 4, 5, 6, 7
b) 2, 1, 4, 3, 6, 5, 7
c) 1, 3, 2, 5, 4, 7, 6
d) 2, 3, 4, 5, 6, 7, 1

View Answer

Answer: b
Explanation: The function rearrange() exchanges data of every node with its next node. It
starts exchanging data from the rst node itself.

5. In the worst case, the number of comparisons needed to search a singly linked list of length n
for a given element is?
a) log 2 n
b) n⁄2
c) log 2 n – 1
d) n

View Answer

Answer: d
Explanation: In the worst case, the element to be searched has to be compared with all
elements of the linked list.

6. Given pointer to a node X in a singly linked list. Only one pointer is given, pointer to head node
is not given, can we delete the node X from given linked list?
https://www.sanfoundry.com/data-structure-questions-answers-experienced/ 5/9
3/23/2021 Data Structure Questions and Answers for Experienced - Sanfoundry

a) Possible if X is not last node


b) Possible if size of linked list is even
c) Possible if size of linked list is odd
d) Possible if X is not rst node

View Answer

Answer: a
Explanation: Following are simple steps.

struct node *temp = X->next;


X->data = temp->data;
X->next = temp->next;
free(temp);

7. You are given pointers to rst and last nodes of a singly linked list, which of the following
operations are dependent on the length of the linked list?
a) Delete the rst element
b) Insert a new element as a rst element
c) Delete the last element of the list
d) Add a new element at the end of the list

View Answer

Answer: c
Explanation: Deletion of the rst element of the list is done in O (1) time by deleting memory
and changing the rst pointer.
Insertion of an element as a rst element can be done in O (1) time. We will create a node that
holds data and points to the head of the given linked list. The head pointer was changed to a
newly created node.
Deletion of the last element requires a pointer to the previous node of last, which can only be
obtained by traversing the list. This requires the length of the linked list.
Adding a new element at the end of the list can be done in O (1) by changing the pointer of the
last node to the newly created node and last is changed to a newly created node.

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-experienced/ 6/9
3/23/2021 Data Structure Questions and Answers for Experienced - Sanfoundry

8. In the worst case, the number of comparisons needed to search a singly linked list of length n
for a given element is?
a) log2 n
b) n⁄2
c) log2 n – 1
d) n

View Answer

Answer: d
Explanation: The worst-case happens if the required element is at last or the element is absent
in the list. For this, we need to compare every element in the linked list. If n elements are
there, n comparisons will happen in the worst case.

Sanfoundry Global Education & Learning Series – Data Structure.

TTo practice all areas of Data Structure for Experienced people, here is complete set of 1000+
Multiple Choice Questions and Answers.

Participate in the Sanfoundry Certi cation contest to get free Certi cate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest

« Prev - Data Structure Questions and Answers – Singly Linked List Operations – 2
» Next - Data Structure Questions and Answers – Singly Linked List

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-experienced/ 7/9
3/23/2021 Data Structure Questions and Answers for Experienced - Sanfoundry

Recommended Posts:
1. Python Programming Examples on Trees
2. Java Programming Examples on Collections
3. Heat Transfer Operations Questions and Answers
4. C Programming Examples on Arrays
5. C Programming Examples on Bitwise Operations
6. C Programming Examples on Combinatorial Problems & Algorithms
7. C Tutorials
8. C Programming Examples on Stacks & Queues
9. Data Science Questions and Answers
10. C Programming Examples on Trees
11. C Programming Examples using Recursion
12. Data Structures & Algorithms II – Questions and Answers
13. C Programming Examples without using Recursion
14. C Programming Examples on Data-Structures
15. Java Programming Examples on Data-Structures
16. C# Programming Examples on Data Structures
17. C++ Programming Examples on Data-Structures
18. Data Structure Questions and Answers
19. Python Programming Examples on Linked Lists
20. C Programming Examples on Linked List

advertisement

Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is
Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN
Architect and is passionate about competency developments in these areas.
He lives in Bangalore and delivers focused training sessions to IT
professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux
Networking, Linux Storage, Advanced C Programming, SAN Storage

https://www.sanfoundry.com/data-structure-questions-answers-experienced/ 8/9
3/23/2021 Data Structure Questions and Answers for Experienced - Sanfoundry

Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with
him @ LinkedIn

Subscribe Sanfoundry Newsletter and Posts

Name*

Email*

Subscribe

About | Certi cations | Internships | Jobs | Privacy Policy | Terms | Copyright | Contact

     

© 2011-2021 Sanfoundry. All Rights Reserved.

https://www.sanfoundry.com/data-structure-questions-answers-experienced/ 9/9
3/23/2021 Singly Linked Lists Questions and Answers - Sanfoundry

Data Structure Questions and Answers – Singly


Linked List
« Prev Next »

This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “Singly Linked
List”.

1. Which of the following is not a disadvantage to the usage of array?


a) Fixed size
b) There are chances of wastage of memory space if elements inserted in an array are lesser
than the allocated size
c) Insertion based on position
d) Accessing elements at speci ed positions

View Answer

Answer: d
Explanation: Array elements can be accessed in two steps. First, multiply the size of the data
type with the speci ed 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.

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-single-linked-lists/ 1/14
3/23/2021 Singly Linked Lists Questions and Answers - Sanfoundry

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)

View Answer

Answer: d
Explanation: Depending on whether the array is full or not, the complexity in dynamic array
varies. If you try to insert into an array that 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, rst you will have to
allocate an array with double the size of the current array and then copy all the elements into
it and nally 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) O(n2)

View Answer

Answer: b
Explanation: 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
{

https://www.sanfoundry.com/data-structure-questions-answers-single-linked-lists/ 2/14
3/23/2021 Singly Linked Lists Questions and Answers - Sanfoundry

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--;

https://www.sanfoundry.com/data-structure-questions-answers-single-linked-lists/ 3/14
3/23/2021 Singly Linked Lists Questions and Answers - Sanfoundry

return cur;
}

b)

advertisement
All 10 Antenna Locations In GTA Online - Cayo Perico Heist

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)

https://www.sanfoundry.com/data-structure-questions-answers-single-linked-lists/ 4/14
3/23/2021 Singly Linked Lists Questions and Answers - Sanfoundry

{
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;
}

View Answer
Answer: a
Explanation: 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 nd 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?

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-single-linked-lists/ 5/14
3/23/2021 Singly Linked Lists Questions and Answers - Sanfoundry

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

View Answer

Answer: c
Explanation: 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)

View Answer

Answer: a
Explanation: 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)
https://www.sanfoundry.com/data-structure-questions-answers-single-linked-lists/ 6/14
3/23/2021 Singly Linked Lists Questions and Answers - Sanfoundry

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)

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-single-linked-lists/ 7/14
3/23/2021 Singly Linked Lists Questions and Answers - Sanfoundry

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++)
{

https://www.sanfoundry.com/data-structure-questions-answers-single-linked-lists/ 8/14
3/23/2021 Singly Linked Lists Questions and Answers - Sanfoundry

temp = temp.getNext();
}
temp.setNext(temp.getNext().getNext());
}
size--;
}

View Answer
Answer: a
Explanation: Loop through the list to get into position one behind the actual position given.
temp.setNext(temp.getNext().getNext()) will delete the speci ed node.

8. Which of these is not an application of a linked list?


a) To implement le systems
b) For separate chaining in hash-tables
c) To implement non-binary trees
d) Random Access of elements

View Answer

Answer: d
Explanation: To implement le system, for separate chaining in hash-tables and to implement
non-binary trees linked lists are used. Elements are accessed sequentially in linked list.
Random access of elements is not an applications of linked list.

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)


{
https://www.sanfoundry.com/data-structure-questions-answers-single-linked-lists/ 9/14
3/23/2021 Singly Linked Lists Questions and Answers - Sanfoundry

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;
}

View Answer
Answer: a
Explanation: ‘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)

https://www.sanfoundry.com/data-structure-questions-answers-single-linked-lists/ 10/14
3/23/2021 Singly Linked Lists Questions and Answers - Sanfoundry

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)

public void insertBegin(Node node)


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

View Answer
Answer: a
Explanation: 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)


{

https://www.sanfoundry.com/data-structure-questions-answers-single-linked-lists/ 11/14
3/23/2021 Singly Linked Lists Questions and Answers - Sanfoundry

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

View Answer

Answer: c
Explanation: When temp is equal to data, the position of data is returned.

Sanfoundry Global Education & Learning Series – Data Structure.

To practice all areas of Data Structure, here is complete set of 1000+ Multiple Choice Questions
and Answers.

Participate in the Sanfoundry Certi cation contest to get free Certi cate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest

« Prev - Data Structure Questions and Answers – Singly Linked List Operations – 3
» Next - Data Structure Questions and Answers – Doubly Linked List

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-single-linked-lists/ 12/14
3/23/2021 Singly Linked Lists Questions and Answers - Sanfoundry

Recommended Posts:
1. C Programming Examples using Recursion
2. C Programming Examples on Searching and Sorting
3. C++ Programming Examples on Combinatorial Problems & Algorithms
4. Data Science Questions and Answers
5. Python Programming Examples on Trees
6. Java Programming Examples on Arrays
7. Java Programming Examples on Combinatorial Problems & Algorithms
8. Java Programming Examples on Collections
9. C Programming Examples on Trees
10. C Programming Examples on Combinatorial Problems & Algorithms
11. C Programming Examples on Arrays
12. C# Programming Examples on Arrays
13. Data Structures & Algorithms II – Questions and Answers
14. C# Programming Examples on Data Structures
15. Java Programming Examples on Data-Structures
16. C Programming Examples on Data-Structures
17. C++ Programming Examples on Data-Structures
18. Data Structure Questions and Answers
19. Python Programming Examples on Linked Lists
20. C Programming Examples on Linked List

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-single-linked-lists/ 13/14
3/23/2021 Singly Linked Lists Questions and Answers - Sanfoundry

Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at
Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate
about competency developments in these areas. He lives in Bangalore and
delivers focused training sessions to IT professionals in Linux Kernel, Linux
Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced
C Programming, SAN Storage Technologies, SCSI Internals & Storage
Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn

Subscribe Sanfoundry Newsletter and Posts

Name*

Email*

Subscribe

About | Certi cations | Internships | Jobs | Privacy Policy | Terms | Copyright | Contact

     

© 2011-2021 Sanfoundry. All Rights Reserved.

https://www.sanfoundry.com/data-structure-questions-answers-single-linked-lists/ 14/14
3/23/2021 Doubly Linked Lists Questions and Answers - Sanfoundry

Data Structure Questions and Answers –


Doubly Linked List
« Prev Next »

This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “Doubly
Linked List”.

1. Which of the following is false about a doubly linked list?


a) We can navigate in both the directions
b) It requires more space than a singly linked list
c) The insertion and deletion of a node take a bit longer
d) Implementing a doubly linked list is easier than singly linked list

View Answer

Answer: d
Explanation: A doubly linked list has two pointers ‘left’ and ‘right’ which enable it to traverse in
either direction. Compared to singly liked list which has only a ‘next’ pointer, doubly linked list
requires extra space to store this extra pointer. Every insertion and deletion requires
manipulation of two pointers, hence it takes a bit longer time. Implementing doubly linked list 
involves setting both left and right pointers to correct nodes and takes more time than singly
linked list.

advertisement
https://www.sanfoundry.com/data-structure-questions-answers-doubly-linked-lists/ 1/13
3/23/2021 Doubly Linked Lists Questions and Answers - Sanfoundry

2. Given the Node class implementation, select one of the following that correctly inserts a node
at the tail of the list.

public class Node


{
protected int data;
protected Node prev;
protected Node next;
public Node(int data)
{
this.data = data;
prev = null;
next = null;
}
public Node(int data, Node prev, Node next)
{
this.data = data;
this.prev = prev;
this.next = next;
}
public int getData()
{
return data;
}
public void setData(int data)
{
this.data = data;
}
public Node getPrev()
{

return prev;
}
public void setPrev(Node prev)
{

https://www.sanfoundry.com/data-structure-questions-answers-doubly-linked-lists/ 2/13
3/23/2021 Doubly Linked Lists Questions and Answers - Sanfoundry

this.prev = prev;
}
public Node getNext
{
return next;
}
public void setNext(Node next)
{
this.next = next;
}
}
public class DLL
{
protected Node head;
protected Node tail;
int length;
public DLL()
{
head = new Node(Integer.MIN_VALUE,null,null);
tail = new Node(Integer.MIN_VALUE,null,null);
head.setNext(tail);
length = 0;
}
}

a)

public void insertRear(int data)


{
Node node = new Node(data,tail.getPrev(),tail);
node.getPrev().setNext(node);
tail.setPrev(node);
length++;
}

b)

public void insertRear(int data)


{
Node node = new Node(data,tail.getPrev(),tail);
node.getPrev().getPrev().setNext(node);
tail.setPrev(node);
length++;
}

c)

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-doubly-linked-lists/ 3/13
3/23/2021 Doubly Linked Lists Questions and Answers - Sanfoundry

All 10 Antenna Locations In GTA Online - Cayo Perico Heist

public void insertRear(int data)


{
Node node = new Node(data,tail.getPrev(),tail);
node.getPrev().setNext(tail);
tail.setPrev(node);
length++;
}

d)

public void insertRear(int data)


{
Node node = new Node(data,head,tail);
node.getPrev().setNext(node);
tail.setPrev(node);
length++;
}

View Answer
Answer: a
Explanation: First create a new node whose ‘prev’ points to the node pointed to by the ‘prev’ of
tail. The ‘next’ of the new node should point to tail. Set the ‘prev’ of tail to point to new node
and the ‘prev’ of new node to point to the new node.

3. What is a memory e cient double linked list?


a) Each node has only one pointer to traverse the list back and forth
b) The list has breakpoints for faster traversal

https://www.sanfoundry.com/data-structure-questions-answers-doubly-linked-lists/ 4/13
3/23/2021 Doubly Linked Lists Questions and Answers - Sanfoundry

c) An auxiliary singly linked list acts as a helper list to traverse through the doubly linked list
d) A doubly linked list that uses bitwise AND operator for storing addresses

View Answer

Answer: a
Explanation: Memory e cient doubly linked list has only one pointer to traverse the list back
and forth. The implementation is based on pointer di erence. It uses bitwise XOR operator to
store the front and rear pointer addresses. Instead of storing actual memory address, every
node store the XOR address of previous and next nodes.

4. Which of the following piece of code removes the node from a given position?
a)

public void remove(int pos)


{
if(pos<0 || pos>=size)
{
System.out.println("Invalid position");
return;
}
else
{
if(head == null)
return;
if(pos == 0)
{
head = head.getNext();
if(head == null)
tail = null;
}
else
{
Node temp = head;
for(int i=1; i<position; i++)
temp = temp.getNext();
}
temp.getNext().setPrev(temp.getPrev());
temp.getPrev().setNext(temp.getNext());
}
size--;
}

b)


advertisement

https://www.sanfoundry.com/data-structure-questions-answers-doubly-linked-lists/ 5/13
3/23/2021 Doubly Linked Lists Questions and Answers - Sanfoundry

public void remove(int pos)


{
if(pos<0 || pos>=size)
{
System.out.println("Invalid position");
return;
}
else
{
if(head == null)
return;
if(pos == 0)
{
head = head.getNext();
if(head == null)
tail = null;
}
else
{
Node temp = head;
for(int i=1; i<position; i++)
temp = temp.getNext();
}
temp.getNext().setPrev(temp.getNext());
temp.getPrev().setNext(temp.getPrev());
}
size--;
}

c)

public void remove(int pos)


{

if(pos<0 || pos>=size)
{
System.out.println("Invalid position");
return;
}

https://www.sanfoundry.com/data-structure-questions-answers-doubly-linked-lists/ 6/13
3/23/2021 Doubly Linked Lists Questions and Answers - Sanfoundry

else
{
if(head == null)
return;
if(pos == 0)
{
head = head.getNext();
if(head == null)
tail = null;
}
else
{
Node temp = head;
for(int i=1; i<position; i++)
temp = temp.getNext().getNext();
}
temp.getNext().setPrev(temp.getPrev());
temp.getPrev().setNext(temp.getNext());
}
size--;
}

d)

public void remove(int pos)


{
if(pos<0 || pos>=size)
{
System.out.println("Invalid position");
return;
}
else
{
if(head == null)
return;
if(pos == 0)
{
head = head.getNext();
if(head == null)
tail = null;
}
else
{
Node temp = head;
for(int i=1; i<position; i++)
temp = temp.getNext().getNext();
} 
temp.getNext().setPrev(temp.getNext());
temp.getPrev().setNext(temp.getPrev());
}

https://www.sanfoundry.com/data-structure-questions-answers-doubly-linked-lists/ 7/13
3/23/2021 Doubly Linked Lists Questions and Answers - Sanfoundry

size--;
}

View Answer
Answer: a
Explanation: If the position to be deleted is not the head, advance to the given position and
manipulate the previous and next pointers of next and previous nodes respectively.

5. How do you calculate the pointer di erence in a memory e cient double linked list?
a) head xor tail
b) pointer to previous node xor pointer to next node
c) pointer to previous node – pointer to next node
d) pointer to next node – pointer to previous node

View Answer

Answer: b
Explanation: The pointer di erence is calculated by taking XOR of pointer to previous node
and pointer to the next node.

6. What is the worst case time complexity of inserting a node in a doubly linked list?
a) O(nlogn)
b) O(logn)
c) O(n)
d) O(1)

View Answer

Answer: c
Explanation: In the worst case, the position to be inserted maybe at the end of the list, hence
you have to traverse through the entire list to get to the correct position, hence O(n).

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-doubly-linked-lists/ 8/13
3/23/2021 Doubly Linked Lists Questions and Answers - Sanfoundry

7. How do you insert a node at the beginning of the list?


a)

public class insertFront(int data)


{
Node node = new Node(data, head, head.getNext());
node.getNext().setPrev(node);
head.setNext(node);
size++;
}

b)

public class insertFront(int data)


{
Node node = new Node(data, head, head);
node.getNext().setPrev(node);
head.setNext(node);
size++;
}

c)

public class insertFront(int data)


{
Node node = new Node(data, head, head.getNext());
node.getNext().setPrev(head);
head.setNext(node);
size++;
}

d)

public class insertFront(int data)


{
Node node = new Node(data, head, head.getNext());
node.getNext().setPrev(node);
head.setNext(node.getNext());
size++;
} 

View Answer
Answer: a
Explanation: The new node’s previous pointer will point to head and next pointer will point to
https://www.sanfoundry.com/data-structure-questions-answers-doubly-linked-lists/ 9/13
3/23/2021 Doubly Linked Lists Questions and Answers - Sanfoundry

the current next of head.

8. Consider the following doubly linked list: head-1-2-3-4-5-tail. What will be the list after
performing the given sequence of operations?

Node temp = new Node(6,head,head.getNext());


Node temp1 = new Node(0,tail.getPrev(),tail);
head.setNext(temp);
temp.getNext().setPrev(temp);
tail.setPrev(temp1);
temp1.getPrev().setNext(temp1);

a) head-0-1-2-3-4-5-6-tail
b) head-1-2-3-4-5-6-tail
c) head-6-1-2-3-4-5-0-tail
d) head-0-1-2-3-4-5-tail

View Answer

Answer: c
Explanation: The given sequence of operations performs addition of nodes at the head and tail
of the list.

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

public int function()


{
Node temp = tail.getPrev();
tail.setPrev(temp.getPrev());
temp.getPrev().setNext(tail);
size--;
return temp.getItem();
}

a) Return the element at the tail of the list but do not remove it
b) Return the element at the tail of the list and remove it from the list
c) Return the last but one element from the list but do not remove it
d) Return the last but one element at the tail of the list and remove it from the list

View Answer

Answer: b
Explanation: The previous and next pointers of the tail and the last but one element are
manipulated, this suggests that the last node is being removed from the list.

https://www.sanfoundry.com/data-structure-questions-answers-doubly-linked-lists/ 10/13
3/23/2021 Doubly Linked Lists Questions and Answers - Sanfoundry

10. Consider the following doubly linked list: head-1-2-3-4-5-tail. What will be the list after
performing the given sequence of operations?

Node temp = new Node(6,head,head.getNext());


head.setNext(temp);
temp.getNext().setPrev(temp);
Node temp1 = tail.getPrev();
tail.setPrev(temp1.getPrev());
temp1.getPrev().setNext(tail);

a) head-6-1-2-3-4-5-tail
b) head-6-1-2-3-4-tail
c) head-1-2-3-4-5-6-tail
d) head-1-2-3-4-5-tail

View Answer

Answer: b
Explanation: A new node is added to the head of the list and a node is deleted from the tail
end of the list.

Sanfoundry Global Education & Learning Series – Data Structure.

To practice all areas of Data Structure, here is complete set of 1000+ Multiple Choice Questions
and Answers.

Participate in the Sanfoundry Certi cation contest to get free Certi cate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest

« Prev - Data Structure Questions and Answers – Singly Linked List


» Next - Data Structure Questions and Answers – Circular Linked List

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-doubly-linked-lists/ 11/13
3/23/2021 Doubly Linked Lists Questions and Answers - Sanfoundry

Recommended Posts:
1. Python Programming Examples
2. Python Programming Examples on Trees
3. C Programming Examples on Combinatorial Problems & Algorithms
4. Home
5. C Programming Examples
6. Object Oriented Programming Questions and Answers
7. C Programming Examples on Trees
8. C Programming Examples on Stacks & Queues
9. C Programming Examples using Recursion
10. Data Science Questions and Answers
11. C Tutorials
12. Data Structures & Algorithms II – Questions and Answers
13. C Programming Examples without using Recursion
14. C# Programming Examples on Data Structures
15. C Programming Examples on Data-Structures
16. Java Programming Examples on Data-Structures
17. C++ Programming Examples on Data-Structures
18. Data Structure Questions and Answers
19. Python Programming Examples on Linked Lists
20. C Programming Examples on Linked List

advertisement


Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at
Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency
developments in these areas. He lives in Bangalore and delivers focused training sessions to IT

https://www.sanfoundry.com/data-structure-questions-answers-doubly-linked-lists/ 12/13
3/23/2021 Doubly Linked Lists Questions and Answers - Sanfoundry

professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux


Networking, Linux Storage, Advanced C Programming, SAN Storage
Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber
Channel. Stay connected with him @ LinkedIn

Subscribe Sanfoundry Newsletter and Posts

Name*

Email*

Subscribe

About | Certi cations | Internships | Jobs | Privacy Policy | Terms | Copyright | Contact

     

© 2011-2021 Sanfoundry. All Rights Reserved.

https://www.sanfoundry.com/data-structure-questions-answers-doubly-linked-lists/ 13/13
3/23/2021 Circular Linked Lists Questions and Answers - Sanfoundry

Data Structure Questions and Answers –


Circular Linked List
« Prev Next »

This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “Circular
Linked List”.

1. What di erentiates a circular linked list from a normal linked list?


a) You cannot have the ‘next’ pointer point to null in a circular linked list
b) It is faster to traverse the circular linked list
c) You may or may not have the ‘next’ pointer point to null in a circular linked list
d) Head node is known in circular linked list

View Answer

Answer: c
Explanation: The ‘next’ pointer points to null only when the list is empty, otherwise it points to
the head of the list. Every node in a circular linked list can be a starting point(head).

advertisement 

https://www.sanfoundry.com/data-structure-questions-answers-circular-linked-lists/ 1/11
3/23/2021 Circular Linked Lists Questions and Answers - Sanfoundry

2. How do you count the number of elements in the circular linked list?
a)

public int length(Node head)


{
int length = 0;
if( head == null)
return 0;
Node temp = head.getNext();
while(temp != head)
{
temp = temp.getNext();
length++;
}
return length;
}

b)

public int length(Node head)


{
int length = 0;
if( head == null)
return 0;
Node temp = head.getNext();
while(temp != null)
{
temp = temp.getNext();
length++;
}
return length;
}

c)

public int length(Node head)


{

https://www.sanfoundry.com/data-structure-questions-answers-circular-linked-lists/ 2/11
3/23/2021 Circular Linked Lists Questions and Answers - Sanfoundry

int length = 0;
if( head == null)
return 0;
Node temp = head.getNext();
while(temp != head && temp != null)
{
temp = head.getNext();
length++;
}
return length;
}

d)

advertisement
All 10 Antenna Locations In GTA Online - Cayo Perico Heist

public int length(Node head)


{
int length = 0;
if( head == null)
return 0;
Node temp = head.getNext();
while(temp != head && temp == null)
{
temp = head.getNext();
length++;
}
return length;
}

View Answer
Answer: a
Explanation: If the head is null, it means that the list is empty. Otherwise, traverse the list until
https://www.sanfoundry.com/data-structure-questions-answers-circular-linked-lists/ 3/11
3/23/2021 Circular Linked Lists Questions and Answers - Sanfoundry

the head of the list is reached.

3. What is the functionality of the following piece of code? Select the most appropriate.

public void function(int data)


{
int flag = 0;
if( head != null)
{
Node temp = head.getNext();
while((temp != head) && (!(temp.getItem() == data)))
{
temp = temp.getNext();
flag = 1;
break;
}
}
if(flag)
System.out.println("success");
else
System.out.println("fail");
}

a) Print success if a particular element is not found


b) Print fail if a particular element is not found
c) Print success if a particular element is equal to 1
d) Print fail if the list is empty

View Answer

Answer: b
Explanation: The function prints fail if the given element is not found. Note that this option is
inclusive of option “Print fail if the list is empty”, the list being empty is one of the cases
covered.

4. What is the time complexity of searching for an element in a circular linked list?
a) O(n)
b) O(nlogn)
c) O(1)
d) O(n2)

View Answer 

Answer: a
Explanation: In the worst case, you have to traverse through the entire list of n elements.

https://www.sanfoundry.com/data-structure-questions-answers-circular-linked-lists/ 4/11
3/23/2021 Circular Linked Lists Questions and Answers - Sanfoundry

5. Which of the following application makes use of a circular linked list?


a) Undo operation in a text editor
b) Recursive function calls
c) Allocating CPU to resources
d) Implement Hash Tables

View Answer

Answer: c
Explanation: Generally, round robin fashion is employed to allocate CPU time to resources
which makes use of the circular linked list data structure. Recursive function calls use stack
data structure. Undo Operation in text editor uses doubly linked lists. Hash tables uses singly
linked lists.

advertisement

6. Choose the code snippet which inserts a node to the head of the list?
a)

public void insertHead(int data)


{
Node temp = new Node(data);
Node cur = head;
while(cur.getNext() != head)
cur = cur.getNext()
if(head == null)
{
head = temp;
head.setNext(head); 
}
else
{
temp.setNext(head);

https://www.sanfoundry.com/data-structure-questions-answers-circular-linked-lists/ 5/11
3/23/2021 Circular Linked Lists Questions and Answers - Sanfoundry

head = temp;
cur.setNext(temp);
}
size++;
}

b)

public void insertHead(int data)


{
Node temp = new Node(data);
while(cur != head)
cur = cur.getNext()
if(head == null)
{
head = temp;
head.setNext(head);
}
else
{
temp.setNext(head.getNext());
cur.setNext(temp);
}
size++;
}

c)

public void insertHead(int data)


{
Node temp = new Node(data);
if(head == null)
{
head = temp;
head.setNext(head);
}
else
{
temp.setNext(head.getNext());
head = temp;
}
size++;
}

d)


public void insertHead(int data)
{
Node temp = new Node(data);
if(head == null)
{
https://www.sanfoundry.com/data-structure-questions-answers-circular-linked-lists/ 6/11
3/23/2021 Circular Linked Lists Questions and Answers - Sanfoundry

head = temp;
head.setNext(head.getNext());
}
else
{
temp.setNext(head.getNext());
head = temp;
}
size++;
}

View Answer
Answer: a
Explanation: If the list is empty make the new node as ‘head’, otherwise traverse the list to the
end and make its ‘next’ pointer point to the new node, set the new node’s next point to the
current head and make the new node as the head.

7. What is the functionality of the following code? Choose the most appropriate answer.

advertisement

public int function()


{
if(head == null)
return Integer.MIN_VALUE; 
int var;
Node temp = head;
while(temp.getNext() != head)
temp = temp.getNext();
if(temp == head)
https://www.sanfoundry.com/data-structure-questions-answers-circular-linked-lists/ 7/11
3/23/2021 Circular Linked Lists Questions and Answers - Sanfoundry

{
var = head.getItem();
head = null;
return var;
}
temp.setNext(head.getNext());
var = head.getItem();
head = head.getNext();
return var;
}

a) Return data from the end of the list


b) Returns the data and deletes the node at the end of the list
c) Returns the data from the beginning of the list
d) Returns the data and deletes the node from the beginning of the list

View Answer

Answer: d
Explanation: First traverse through the list to nd the end node, then manipulate the ‘next’
pointer such that it points to the current head’s next node, return the data stored in head and
make this next node as the head.

8. What is the functionality of the following code? Choose the most appropriate answer.

public int function()


{
if(head == null)
return Integer.MIN_VALUE;
int var;
Node temp = head;
Node cur;
while(temp.getNext() != head)
{
cur = temp;
temp = temp.getNext();
}
if(temp == head)
{
var = head.getItem();
head = null;
return var;
}
var = temp.getItem();
cur.setNext(head);
return var; 
}

a) Return data from the end of the list


b) Returns the data and deletes the node at the end of the list

https://www.sanfoundry.com/data-structure-questions-answers-circular-linked-lists/ 8/11
3/23/2021 Circular Linked Lists Questions and Answers - Sanfoundry

c) Returns the data from the beginning of the list


d) Returns the data and deletes the node from the beginning of the list

View Answer

Answer: b
Explanation: First traverse through the list to nd the end node, also have a trailing pointer to
nd the penultimate node, make this trailing pointer’s ‘next’ point to the head and return the
data stored in the ‘temp’ node.

9. Which of the following is false about a circular linked list?


a) Every node has a successor
b) Time complexity of inserting a new node at the head of the list is O(1)
c) Time complexity for deleting the last node is O(n)
d) We can traverse the whole circular linked list by starting from any point

View Answer

Answer: b
Explanation: Time complexity of inserting a new node at the head of the list is O(n) because
you have to traverse through the list to nd the tail node.

10. Consider a small circular linked list. How to detect the presence of cycles in this list
e ectively?
a) Keep one node as head and traverse another temp node till the end to check if its ‘next points
to head
b) Have fast and slow pointers with the fast pointer advancing two nodes at a time and slow
pointer advancing by one node at a time
c) Cannot determine, you have to pre-de ne if the list contains cycles
d) Circular linked list itself represents a cycle. So no new cycles cannot be generated

View Answer

Answer: b
Explanation: Advance the pointers in such a way that the fast pointer advances two nodes at a
time and slow pointer advances one node at a time and check to see if at any given instant of
time if the fast pointer points to slow pointer or if the fast pointer’s ‘next’ points to the slow
pointer. This is applicable for smaller lists.

Sanfoundry Global Education & Learning Series – Data Structure.

To practice all areas of Data Structure, here is complete set of 1000+ Multiple Choice Questions
and Answers. 

Participate in the Sanfoundry Certi cation contest to get free Certi cate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

https://www.sanfoundry.com/data-structure-questions-answers-circular-linked-lists/ 9/11
3/23/2021 Circular Linked Lists Questions and Answers - Sanfoundry

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest

« Prev - Data Structure Questions and Answers – Doubly Linked List


» Next - Data Structure Questions and Answers – Stack using Array

advertisement

Recommended Posts:
1. Java Programming Examples on Collections
2. Java Algorithms, Problems & Programming Examples
3. Python Programming Examples on Trees
4. C Programming Examples on Combinatorial Problems & Algorithms
5. C Programming Examples
6. Object Oriented Programming Questions and Answers
7. C Programming Examples on Trees
8. C Tutorials
9. C Programming Examples on Stacks & Queues
10. Data Science Questions and Answers
11. C Programming Examples using Recursion
12. Data Structures & Algorithms II – Questions and Answers
13. C Programming Examples without using Recursion
14. C Programming Examples on Data-Structures
15. Java Programming Examples on Data-Structures
16. C++ Programming Examples on Data-Structures
17. C# Programming Examples on Data Structures
18. Data Structure Questions and Answers
19. Python Programming Examples on Linked Lists
20. C Programming Examples on Linked List 

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-circular-linked-lists/ 10/11
3/23/2021 Circular Linked Lists Questions and Answers - Sanfoundry

Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is
Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN
Architect and is passionate about competency developments in these areas.
He lives in Bangalore and delivers focused training sessions to IT
professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux
Networking, Linux Storage, Advanced C Programming, SAN Storage
Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber
Channel. Stay connected with him @ LinkedIn

Subscribe Sanfoundry Newsletter and Posts

Name*

Email*

Subscribe

About | Certi cations | Internships | Jobs | Privacy Policy | Terms | Copyright | Contact

     

© 2011-2021 Sanfoundry. All Rights Reserved.

https://www.sanfoundry.com/data-structure-questions-answers-circular-linked-lists/ 11/11
3/23/2021 Stack using Array Questions and Answers - Sanfoundry

Data Structure Questions and Answers – Stack


using Array
« Prev Next »

This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “Stack using
Array”.

1. Which of the following real world scenarios would you associate with a stack data structure?
a) piling up of chairs one above the other
b) people standing in a line to be serviced at a counter
c) o er services based on the priority of the customer
d) tatkal Ticket Booking in IRCTC

View Answer

Answer: a
Explanation: Stack follows Last In First Out (LIFO) policy. Piling up of chairs one above the other
is based on LIFO, people standing in a line is a queue and if the service is based on priority,
then it can be associated with a priority queue. Tatkal Ticket Booking Follows First in First Out
Policy. People who click the book now rst will enter the booking page rst. 

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-stack-array/ 1/9
3/23/2021 Stack using Array Questions and Answers - Sanfoundry

2. What does the following function check for? (all necessary headers to be included and function
is called from main)

#define MAX 10

typedef struct stack


{
int top;
int item[MAX];
}stack;

int function(stack *s)


{
if(s->top == -1)
return 1;
else return 0;
}

a) full stack
b) invalid index
c) empty stack
d) in nite stack

View Answer

Answer: c
Explanation: An empty stack is represented with the top-of-the-stack(‘top’ in this case) to be
equal to -1.

3. What does ‘stack under ow’ refer to?


a) accessing item from an unde ned stack

b) adding items to a full stack
c) removing items from an empty stack

https://www.sanfoundry.com/data-structure-questions-answers-stack-array/ 2/9
3/23/2021 Stack using Array Questions and Answers - Sanfoundry

d) index out of bounds exception

View Answer

Answer: c
Explanation: Removing items from an empty stack is termed as stack under ow.

advertisement

Dainsleif questions and answers in Genshin Impact

4. What is the output of the following program?

public class Stack


{
protected static final int CAPACITY = 100;
protected int size,top = -1;
protected Object stk[];

public Stack()
{
stk = new Object[CAPACITY];
}

public void push(Object item)


{
if(size_of_stack==size)
{
System.out.println("Stack overflow");
return;
}

else
{
top++;
stk[top]=item;

https://www.sanfoundry.com/data-structure-questions-answers-stack-array/ 3/9
3/23/2021 Stack using Array Questions and Answers - Sanfoundry

}
}
public Object pop()
{
if(top<0)
{
return -999;
}
else
{
Object ele=stk[top];
top--;
size_of_stack--;
return ele;
}
}
}

public class StackDemo


{
public static void main(String args[])
{
Stack myStack = new Stack();
myStack.push(10);
Object element1 = myStack.pop();
Object element2 = myStack.pop();
System.out.println(element2);
}
}

a) stack is full
b) 20
c) 0
d) -999

View Answer

Answer: d
Explanation: The rst call to pop() returns 10, whereas the second call to pop() would result in
stack under ow and the program returns -999.

5. What is the time complexity of pop() operation when the stack is implemented using an array?
a) O(1)
b) O(n)
c) O(logn)
d) O(nlogn) 
View Answer

https://www.sanfoundry.com/data-structure-questions-answers-stack-array/ 4/9
3/23/2021 Stack using Array Questions and Answers - Sanfoundry

Answer: a
Explanation: pop() accesses only one end of the structure, and hence constant time.

6. Which of the following array position will be occupied by a new element being pushed for a
stack of size N elements(capacity of stack > N)?
a) S[N-1]
b) S[N]
c) S[1]
d) S[0]

View Answer

Answer: b
Explanation: Elements are pushed at the end, hence N.

advertisement

7. What happens when you pop from an empty stack while implementing using the Stack ADT in
Java?
a) Unde ned error
b) Compiler displays a warning
c) EmptyStackException is thrown
d) NoStackException is thrown

View Answer

Answer: c
Explanation: The Stack ADT throws an EmptyStackException if the stack is empty and a pop()

operation is tried on it.

8. What is the functionality of the following piece of Java code?


Assume: ‘a’ is a non empty array of integers, the Stack class creates an array of speci ed size and
https://www.sanfoundry.com/data-structure-questions-answers-stack-array/ 5/9
3/23/2021 Stack using Array Questions and Answers - Sanfoundry

provides a top pointer indicating TOS(top of stack), push and pop have normal meaning.

public void some_function(int[] a)


{
Stack S=new Stack(a.length);
int[] b=new int[a.length];
for(int i=0;i<a.length;i++)
{
S.push(a[i]);
}
for(int i=0;i<a.length;i++)
{
b[i]=(int)(S.pop());
}
System.out.println("output :");
for(int i=0;i<b.length;i++)
{
System.out.println(b[i]);
}
}

a) print alternate elements of array


b) duplicate the given array
c) parentheses matching
d) reverse the array

View Answer

Answer: d
Explanation: Every element from the given array ‘a’ is pushed into the stack, and then the
elements are popped out into the array ‘b’. Stack is a LIFO structure, this results in reversing
the given array.

9. Array implementation of Stack is not dynamic, which of the following statements supports this
argument?
a) space allocation for array is xed and cannot be changed during run-time
b) user unable to give the input for stack operations
c) a runtime exception halts execution
d) improper program compilation

View Answer

Answer: a
Explanation: You cannot modify the size of an array once the memory has been allocated,

adding fewer elements than the array size would cause wastage of space, and adding more
elements than the array size at run time would cause Stack Over ow.

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-stack-array/ 6/9
3/23/2021 Stack using Array Questions and Answers - Sanfoundry

10. Which of the following array element will return the top-of-the-stack-element for a stack of
size N elements(capacity of stack > N)?
a) S[N-1]
b) S[N]
c) S[N-2]
d) S[N+1]

View Answer

Answer: a
Explanation: Array indexing start from 0, hence N-1 is the last index.

Sanfoundry Global Education & Learning Series – Data Structure.

To practice all areas of Data Structure, here is complete set of 1000+ Multiple Choice Questions
and Answers.

Participate in the Sanfoundry Certi cation contest to get free Certi cate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest

« Prev - Data Structure Questions and Answers – Circular Linked List


» Next - Data Structure Questions and Answers – Stack using Linked List

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-stack-array/ 7/9
3/23/2021 Stack using Array Questions and Answers - Sanfoundry

Recommended Posts:
1. C# Programming Examples on Exceptions
2. Microprocessor Questions & Answers
3. C Programming Examples using Recursion
4. Java Programming Examples on Java.Lang
5. Java Programming Examples on Multithreading
6. C# Programming Examples on Threads
7. C++ Programming Examples on STL
8. Data Structures & Algorithms II – Questions and Answers
9. Data Science Questions and Answers
10. Java Programming Examples on Inheritance
11. Python Programming Examples on Searching and Sorting
12. C Programming Examples on Searching and Sorting
13. Object Oriented Programming Questions and Answers
14. Python Programming Examples on Stacks & Queues
15. C# Programming Examples on Data Structures
16. C Programming Examples on Stacks & Queues
17. C++ Programming Examples on Data-Structures
18. C Programming Examples on Data-Structures
19. Java Programming Examples on Data-Structures
20. Data Structure Questions and Answers

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-stack-array/ 8/9
3/23/2021 Stack using Array Questions and Answers - Sanfoundry

Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is
Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN
Architect and is passionate about competency developments in these areas.
He lives in Bangalore and delivers focused training sessions to IT
professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux
Networking, Linux Storage, Advanced C Programming, SAN Storage
Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber
Channel. Stay connected with him @ LinkedIn

Subscribe Sanfoundry Newsletter and Posts

Name*

Email*

Subscribe

About | Certi cations | Internships | Jobs | Privacy Policy | Terms | Copyright | Contact

     

© 2011-2021 Sanfoundry. All Rights Reserved.

https://www.sanfoundry.com/data-structure-questions-answers-stack-array/ 9/9
3/23/2021 Stack using Linked List Questions and Answers - Sanfoundry

Data Structure Questions and Answers – Stack


using Linked List
« Prev Next »

This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “Stack using
Linked List”.

1. What is the best case time complexity of deleting a node in a Singly Linked list?
a) O (n)
b) O (n2)
c) O (nlogn)
d) O (1)

View Answer

Answer: d
Explanation: Deletion of the head node in the linked list is taken as the best case. The
successor of the head node is changed to head and deletes the predecessor of the newly
assigned head node. This process completes in O(1) time.

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-stack-linked-list/ 1/12
3/23/2021 Stack using Linked List Questions and Answers - Sanfoundry

2. Which of the following statements are not correct with respect to Singly Linked List(SLL) and
Doubly Linked List(DLL)?
a) Complexity of Insertion and Deletion at known position is O(n) in SLL and O(1) in DLL
b) SLL uses lesser memory per node than DLL
c) DLL has more searching power than SLL
d) Number of node elds in SLL is more than DLL

View Answer

3. Given below is the Node class to perform basic list operations and a Stack class with a no arg
constructor.
Select from the options the appropriate pop() operation that can be included in the Stack class.
Also ‘ rst’ is the top-of-the-stack.

class Node
{
protected Node next;
protected Object ele;
Node()
{
this(null,null);
}
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()
{
https://www.sanfoundry.com/data-structure-questions-answers-stack-linked-list/ 2/12
3/23/2021 Stack using Linked List Questions and Answers - Sanfoundry

return next;
}
public Object getEle()
{
return ele;
}
}

class Stack
{
Node first;
int size=0;
Stack()
{
first=null;
}
}

a)

public Object pop()


{
if(size == 0)
System.out.println("underflow");
else
{
Object o = first.getEle();
first = first.getNext();
size--;
return o;
}
}

b)

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-stack-linked-list/ 3/12
3/23/2021 Stack using Linked List Questions and Answers - Sanfoundry

All 10 Antenna Locations In GTA Online - Cayo Perico Heist

public Object pop()


{
if(size == 0)
System.out.println("underflow");
else
{
Object o = first.getEle();
first = first.getNext().getNext();
size--;
return o;
}
}

c)

public Object pop()


{
if(size == 0)
System.out.println("underflow");
else
{
first = first.getNext();
Object o = first.getEle();
size--;
return o;
}
}

d)

public Object pop()


{

https://www.sanfoundry.com/data-structure-questions-answers-stack-linked-list/ 4/12
3/23/2021 Stack using Linked List Questions and Answers - Sanfoundry

if(size == 0)
System.out.println("underflow");
else
{
first = first.getNext().getNext();
Object o = first.getEle();
size--;
return o;
}
}

View Answer
Answer: a
Explanation: pop() should return the Object pointed to by the node ‘ rst’. The sequence of
operations is, rst, get the element stored at node ‘ rst’ using getEle(), and second, make the
node point to the next node using getNext().

4. What does the following function do?

public Object some_func()throws emptyStackException


{
if(isEmpty())
throw new emptyStackException("underflow");
return first.getEle();
}

a) pop
b) delete the top-of-the-stack element
c) retrieve the top-of-the-stack element
d) push operation

View Answer

Answer: c
Explanation: This code is only retrieving the top element, note that it is not equivalent to pop
operation as you are not setting the ‘next’ pointer point to the next node in sequence.

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-stack-linked-list/ 5/12
3/23/2021 Stack using Linked List Questions and Answers - Sanfoundry

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

public void display()


{
if(size == 0)
System.out.println("underflow");
else
{
Node current = first;
while(current != null)
{
System.out.println(current.getEle());
current = current.getNext();
}
}
}

a) reverse the list


b) display the list
c) display the list excluding top-of-the-stack-element
d) reverse the list excluding top-of-the-stack-element

View Answer

Answer: b
Explanation: An alias of the node ‘ rst’ is created which traverses through the list and displays
the elements.

6. What does ‘stack over ow’ refer to?


a) accessing item from an unde ned stack
b) adding items to a full stack
c) removing items from an empty stack
d) index out of bounds exception

View Answer

Answer: b
Explanation: Adding items to a full stack is termed as stack under ow.

https://www.sanfoundry.com/data-structure-questions-answers-stack-linked-list/ 6/12
3/23/2021 Stack using Linked List Questions and Answers - Sanfoundry

7. Given below is the Node class to perform basic list operations and a Stack class with a no arg
constructor. Select from the options the appropriate push() operation that can be included in the
Stack class. Also ‘ rst’ is the top-of-the-stack.

class Node
{
protected Node next;
protected Object ele;
Node()
{
this(null,null);
}
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 Stack
{
Node first;
int size=0;
Stack()
{
first=null;
}
}

a)

advertisement

https://www.sanfoundry.com/data-structure-questions-answers-stack-linked-list/ 7/12
3/23/2021 Stack using Linked List Questions and Answers - Sanfoundry

public void push(Object item)


{
Node temp = new Node(item,first);
first = temp;
size++;
}

b)

public void push(Object item)


{
Node temp = new Node(item,first);
first = temp.getNext();
size++;
}

c)

public void push(Object item)


{
Node temp = new Node();
first = temp.getNext();
first.setItem(item);
size++;
}

d)

public void push(Object item)


{
Node temp = new Node();
first = temp.getNext.getNext();

first.setItem(item);
size++;
}

https://www.sanfoundry.com/data-structure-questions-answers-stack-linked-list/ 8/12
3/23/2021 Stack using Linked List Questions and Answers - Sanfoundry

View Answer
Answer: a
Explanation: To push an element into the stack, rst create a new node with the next pointer
point to the current top-of-the-stack node, then make this node as top-of-the-stack by
assigning it to ‘ rst’.

8. Consider these functions:


push() : push an element into the stack
pop() : pop the top-of-the-stack element
top() : returns the item stored in top-of-the-stack-node
What will be the output after performing these sequence of operations

push(20);
push(4);
top();
pop();
pop();
pop();
push(5);
top();

a) 20
b) 4
c) stack under ow
d) 5

View Answer

Answer: d
Explanation: 20 and 4 which were pushed are popped by the two pop() statements, the recent
push() is 5, hence top() returns 5.

9. Which of the following data structures can be used for parentheses matching?
a) n-ary tree
b) queue
c) priority queue
d) stack

View Answer

Answer: d
Explanation: For every opening brace, push it into the stack, and for every closing brace, pop it
o the stack. Do not take action for any other character. In the end, if the stack is empty, then
the input has balanced parentheses.
https://www.sanfoundry.com/data-structure-questions-answers-stack-linked-list/ 9/12
3/23/2021 Stack using Linked List Questions and Answers - Sanfoundry

10. Minimum number of queues to implement stack is ___________


a) 3
b) 4
c) 1
d) 2

View Answer

Answer: c
Explanation: Use one queue and one counter to count the number of elements in the queue.

Sanfoundry Global Education & Learning Series – Data Structure.

To practice all areas of Data Structure, here is complete set of 1000+ Multiple Choice Questions
and Answers.

Participate in the Sanfoundry Certi cation contest to get free Certi cate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest

« Prev - Data Structure Questions and Answers – Stack using Array


» Next - Data Structure Questions and Answers – Queue using Array

advertisement

Recommended Posts:
1. C Programming Examples on Searching and Sorting 
2. Home
3. C# Programming Examples on Exceptions
4. Python Programming Examples on Searching and Sorting
5. Data Science Questions and Answers
https://www.sanfoundry.com/data-structure-questions-answers-stack-linked-list/ 10/12
3/23/2021 Stack using Linked List Questions and Answers - Sanfoundry

6. Object Oriented Programming Questions and Answers


7. Data Structures & Algorithms II – Questions and Answers
8. C Programming Examples using Recursion
9. Java Programming Examples on Event Handling
10. C Programming Examples without using Recursion
11. Java Programming Examples on Collections
12. Python Programming Examples on Stacks & Queues
13. C Programming Examples on Stacks & Queues
14. Java Programming Examples on Data-Structures
15. C++ Programming Examples on Data-Structures
16. C Programming Examples on Data-Structures
17. Data Structure Questions and Answers
18. Python Programming Examples on Linked Lists
19. C# Programming Examples on Data Structures
20. C Programming Examples on Linked List

advertisement

Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is
Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN
Architect and is passionate about competency developments in these areas.
He lives in Bangalore and delivers focused training sessions to IT
professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux
Networking, Linux Storage, Advanced C Programming, SAN Storage
Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber
Channel. Stay connected with him @ LinkedIn

Subscribe Sanfoundry Newsletter and Posts

https://www.sanfoundry.com/data-structure-questions-answers-stack-linked-list/ 11/12
3/23/2021 Stack using Linked List Questions and Answers - Sanfoundry

Name*

Email*

Subscribe

About | Certi cations | Internships | Jobs | Privacy Policy | Terms | Copyright | Contact

     

© 2011-2021 Sanfoundry. All Rights Reserved.

https://www.sanfoundry.com/data-structure-questions-answers-stack-linked-list/ 12/12
1)Which of the following type of operators have higher precedence_____
a)Relational operators b)equality operators
c)Logical operators d)Arithmatic operators
ans-Arithmatic operators

2)Which of the following operators takes only integer operands?


a)+ b)/ c)% d)*
ans-%

3)Which of the operators associate from left?


a)+ b)> c)% d)all of these
ans-all of these

4)If a,b,c are integer variables with values 1,2,3 respectively, then what is the value
of the expression
!((a+5)<(b+c))
a)0 b)6 c)5 d)1
ans-1

5) Give the value of x after execution of given code.


x=5
x=x++ +++x-x;
a)5 b)7 c)6 d)0
ans-7

6)Construct a logical expression to check whether x is largest among three


numbers x,y,z
a)x>y&&x>z b)!(x<=y||x<=z) c)x>y,z d)both a and b
ans-d

Q.7 In a circular linked list……….


(A) components are all linked together in some sequential manner.
(B) there is no beginning and no end.
(C) components are arranged hierarchically.
(D) forward and backward traversal within the list is permitted.
Ans:B
Q.8 In a linked list with n nodes, the time taken to insert an element after an
element pointed by some pointer is……..
(A) 0 (1) (B) 0 (log n) (C) 0 (n) (D) 0 (n 1og n)
Ans:A
Q.9 The data structure required to evaluate a postfix expression is …….
(A) queue (B) stack (C) array (D) linked-list
Ans:B
Q.10 Which of the following sorting methods would be most suitable for sorting a
list which is almost sorted …………
(A) Bubble Sort (B) Insertion Sort
(C) Selection Sort (D) Quick Sort
Ans:A
Q.11 Representation of data structure in memory is known as………….
(A) recursive (B) abstract data type
(C) storage structure (D) file structure
Ans:B
Q.12 The largest element of an array index is called its………..
(A) lower bound. (B) range.
(C) upper bound. (D) All of these.
Ans. (C)
Q.13 Which data structure is used for implementing recursion?
(A) Queue. (B) Stack.
(C) Arrays. (D) List.
Ans. (B)
Q.14 Null character needs a space of……………
A. zero bytes B. one byte
C. three bytes D. four bytes
Ans. (B)
Q.15 …………gives the step-by-step procedure for solving the problem which
gives correct solution.
A.Algorithm B.Array
C.Link List D.None of the above
Ans.(A)
Q.16 Which of the followings are derived data types?
A.Array B.String
C.Float D.Both ‘a’ &’b’
Ans.(D)
Q.17 Which of the followings are application of data structure?
A.Facebook B.Searching
C.Sorting D.All of the above
Ans.(D)
Q.18 Which of the following data structure is not linear data structure?
A.Array B.Linked List
C.Both of above D.None of above
Ans.(A)
Q.19 Which of the following steps are correct for solving the problem?
A.Identify the problem B.Explore information & create ideas
C.Select the best ideas D.All of these
Ans.(D)
Q20) In how many blocks Problem Analysis Chartis divided?
A) 2 B)3 C)4 D)5
Ans.(C)
Q21) Interactivity Chart is divided into subtasks called _____.
A) Function
B) Module
C) Sub program
D) None
Ans. (B)
Q 22) what is full form of IPO?
A) Input-Program-Output B) Input-Parallel-Output
C)Input-Processing-Output D) Inbuilt- Processing-Output
Ans.(C)
Q23) Algorithms are similar to____
A) Flowchart
B) Pseudo code
C) Interactivity chart
D) Problem Analysis Chart
Ans. (B)

Q24) Flowcharts can show errors in ____ which is not readily visible in the other
charts.
A) Arithmetic operations
B) Logic
C) Code
D) All of these
Ans. (B)
Q25) Which equation is to be satisfied to find the BIG-O?
A) F(n)=c*g(n)
B) F(n)>=c*g(n)
C) F(n)<=c*g(n)
D) None
ANS:C

Q26) Time Complexity is


A) Time required for the machine to compile the program.
B) Time required for the machine to execute the program.
C) Time required for the machine to debug the program.
D) None
ANS:B

Q27) Step count for the following loop is


For(int i=5; i>0; i++)
A) 5 times
B) N+1 times
C) Infinite
D) No execution
ANS:C

Q28) which of the following is not an asymptotic notation?


A) BIG-O
B) Omega
C) Phi
D) Theta
ANS:C
Q29) What is the step count of 5th line?
1. For(int i=0, i<4, i++)
2. {
3. For(int j=5; j>0; j--)
4. {
5. Cout<<A[i][j];
6. }
7. }
A) 16
B) 25
C) 20
D) 5
ANS:C
Q.30 Which of the following character used for null….?

a) /0 b)\0 c)/n d)\n

Q.31 which of the following is not datatype…?

a)float b)long int c)long float d)long string

Q.32 Variable is…………..

a) used to store a data value

b) used to store address

c) it has fixed value

d) none of these

Q.33 In c++ float datatype allocate……..memory.

a) 4byte b) 8byte c)16byte d)1byte

Q.34 In c float datatype allocate……..memory.

a) 8byte b) 4byte c)16byte d)1byte

Q.35 For function which is sequence of syntax…?

a) define-calling-declaration

b) declaration-define-calling

c) calling-define-declaration

d) none of these
Q.36. The function written by the user according to requirement
known As…………..

a) mathematical function b) string function

c) user define function d) none of above

Q.37. Which of the following is syntax for declaration of array…?

a) datatype array_name[size]

b) datatype string name[size]

c) datatype [size] array_name

d) none of these

Q38. Which of the following is type of function…?

a) mathematical function b) statistical function

c) utility function d) all of above

Q39. Array is……….datatype

a) homogenous datatype b) heterogenous datatype

c) both a & b d) none of above

Q40. The smallest element of an array index called……

a) lower bound b) upper bound c) range d) none of above


JSPM's
Jayawantrao sawant College of EngineeringHadpsar, Pune-33
Department of Information Technology
Multiple Choice Questions

Unit-1

1. Which of the following is not a valid variable name declaration?


a) int _a3;
b) int a_3;
c) int 3_a;
d) int _3a
Answer:c

2. Variable names beginning with underscore is not encouraged. Why?


a) It is not standardized
b) To avoid conflicts since assemblers and loaders use such names
c) To avoid conflicts since library routines use such names
d) To avoid conflicts with environment variables of an operating system
Answer:c

3. All keywords in C are in


a) LowerCase letters
b) UpperCase letters
c) CamelCase letters
d) None
Answer:a

4. Variable name resolving (number of significant characters for uniqueness of variable) depends
on
a) Compiler and linker implementations
b) Assemblers and loaders implementations
c) C language
d) None
Answer:a

5. Which of the following is not a valid C variable name?


a) int number;
b) float rate;
c) int variable_count;
d) int $main;
Answer:d

6. Which of the following is true for variable names in C?


a) They can contain alphanumeric characters as well as special characters
b) It is not an error to declare a variable to be one of the keywords(like goto, static)
c) Variable names cannot start with a digit
d) Variable can be of any length
Answer:c

7. What is the output of this C code?


#include <stdio.h>
int main()
{
int c = 2 ^ 3;
printf("%d\n", c);
}

a) 1
b) 8
c) 9
d) 0
Answer: a

8. What is the output of this C code?

#include <stdio.h>
int main()
{
unsigned int a = 10;
a = ~a;
printf("%d\n", a);
}

a) -9
b) -10
c) -11
d) 10
Answer:c

9. What is the output of this C code?

#include <stdio.h>
int main()
{
if (7 & 8)
printf("Honesty");
if ((~7 & 0x000f) == 8)
printf("is the best policy\n");
}

a) Honesty is the best policy


b) Honesty
c) is the best policy
d) No output
Answer:c

10. What is the output of this C code?

#include <stdio.h>
int main()
{
int a = 2;
if (a >> 1)
printf("%d\n", a);
}

a) 0
b) 1
c) 2
d) No Output.
Answer:c

11. Comment on the output of this C code?

#include <stdio.h>
int main()
{
int i, n, a = 4;
scanf("%d", &n);
for (i = 0; i < n; i++)
a = a * 2;
}

a) Logical Shift left


b) No output
c) Arithmetic Shift right
d) bitwise exclusive OR
Answer:b

12. What is the output of this C code?

#include <stdio.h>
void main()
{
int x = 97;
int y = sizeof(x++);
printf("x is %d", x);
}

a) x is 97
b) x is 98
c) x is 99
d) Run time error
Answer:a

13. What is the output of this C code?

#include <stdio.h>
void main()
{
int x = 4, y, z;
y = --x;
z = x--;
printf("%d%d%d", x, y, z);
}

a) 3 2 3
b) 2 2 3
c) 3 2 2
d) 2 3 3
Answer:d

14. What is the output of this C code?

#include <stdio.h>
void main()
{
int x = 4;
int *p = &x;
int *k = p++;
int r = p - k;
printf("%d", r);
}

a) 4
b) 8
c) 1
d) Run time error
Answer:c

15. What is the output of this C code?

#include <stdio.h>
int main()
{
int x = 2, y = 0;
int z = (y++) ? y == 1 && x : 0;
printf("%d\n", z);
return 0;
}
a) 0
b) 1
c) Undefined behaviour
d) Compile time error
Answer:a

16. What is the output of this C code?

#include <stdio.h>
int main()
{
int x = 1;
int y = x == 1 ? getchar(): 2;
printf("%d\n", y);
}

a) Compile time error


b) Whatever character getchar function returns
c) Ascii value of character getchar function returns
d) 2
Answer:c

17. What is the output of this C code?

#include <stdio.h>
int main()
{
int x = 1;
short int i = 2;
float f = 3;
if (sizeof((x == 2) ? f : i) == sizeof(float))
printf("float\n");
else if (sizeof((x == 2) ? f : i) == sizeof(short int))
printf("short int\n");
}

a) float
b) short int
c) Undefined behaviour
d) Compile time error
Answer:a

18. What is the output of this C code?

#include <stdio.h>
int main()
{
int a = 2;
int b = 0;
int y = (b == 0) ? a :(a > b) ? (b = 1): a;
printf("%d\n", y);
}

a) Compile time error


b) 1
c) 2
d) Undefined behaviour
Answer:c

19. What is the output of this C code?

#include <stdio.h>
int main()
{
int y = 1, x = 0;
int l = (y++, x++) ? y : x;
printf("%d\n", l);
}

a) 1
b) 2
c) Compile time error
d) Undefined behaviour
Answer:a

19. Comment on the output of this C code?

#include <stdio.h>
void main()
{
int k = 8;
int m = 7;
int z = k < m ? k = m : m++;
printf("%d", z);
}

a) Run time error


b) 7
c) 8

d) Depends on compiler
Answer:b

20. The code snippet below produces

#include <stdio.h>
void main()
{
1 < 2 ? return 1 : return 2;
}
a) returns 1
b) returns 2
c) Varies
d) Compile time error
Answer:d

21. What is the difference between the following 2 codes?

#include <stdio.h> //Program 1


int main()
{
int d, a = 1, b = 2;
d = a++ + ++b;
printf("%d %d %d", d, a, b);
}
#include <stdio.h> //Program 2
int main()
{
int d, a = 1, b = 2;
d = a++ + ++b;
printf("%d %d %d", d, a, b);
}

a) No difference as space doesn’t make any difference, values of a, b, d are same in both the
case
b) No difference as space doesn’t make any difference, values of a, b, d are different
c) Program 1 has syntax error, program 2 is not
d) Program 2 has syntax error, program 1 is not
b) Answer:a

22. What is the output of this C code?

#include <stdio.h>
int main()
{
int a = 1, b = 1, c;
c = a++ + b;
printf("%d, %d", a, b);
}

a) a = 1, b = 1
b) a = 2, b = 1
c) a = 1, b = 2
d) a = 2, b = 2
Answer:b

23. What is the output of this C code?

#include <stdio.h>
int main()
{
int a = 1, b = 1, d = 1;
printf("%d, %d, %d", ++a + ++a+a++, a++ + ++b, ++d + d++ + a++);
}

a) 15, 4, 5
b) 9, 6, 9
c) 9, 3, 5
d) 6, 4, 6
Answer:a

24. For which of the following, “PI++;” code will fail?


a) #define PI 3.14
b) char *PI = “A”;
c) float PI = 3.14;
d) Both (A) and (B)
Answer:a

25. What is the output of this C code?

#include <stdio.h>
int main()
{
int a = 10, b = 10;
if (a = 5)
b--;
printf("%d, %d", a, b--);
}

a) a = 10, b = 9
b) a = 10, b = 8
c) a = 5, b = 9
d) a = 5, b = 8
Answer:c

26. What is the output of this C code?

#include <stdio.h>
int main()
{
int i = 0;
int j = i++ + i;
printf("%d\n", j);
}

a) 0
b) 1
c) 2
d) Compile time error
Answer:a
27. What is the output of this C code?

#include <stdio.h>
int main()
{
int i = 2;
int j = ++i + i;
printf("%d\n", j);
}

a) 6
b) 5
c) 4
d) Compile time error
Answer:a

28. Comment on the output of this C code?

#include <stdio.h>
int main()
{
int i = 2;
int i = i++ + i;
printf("%d\n", i);
}

a) = operator is not a sequence point


b) ++ operator may return value with or without side effects
c) it can be evaluated as (i++)+i or i+(++i)
d) Both a and b
Answer:a

29. #include is called


a) Preprocessor directive
b) Inclusion directive
c) File inclusion directive
d) None of the mentioned
Answer:a

30. C preprocessors can have compiler specific features.


a) true
b) false
c) Depends on the standard
d) Depends on the platform
Answer:a
31. C preprocessor is conceptually the first step during compilation
a) true
b) false
c) Depends on the compiler
d) Depends on the standard
Answer:a

32. Preprocessor feature that supply line numbers and filenames to compiler is called?
a) Selective inclusion
b) macro substitution
c) Concatenation
d) Line control
Answer:d

33. #include are _______ files and #include “somefile.h” ________ files.
a) Library, Library
b) Library, user-created header
c) User-created header, library
d) They can include all types of file
Answer:d

34. A preprocessor is a program


a) That processes its input data to produce output that is used as input to another program
b) That is nothing but a loader
c) That links various source files
d) All of the mentioned
Answer:a

35.The sequence of allocation and deletion of variables for the following code is.

#include <stdio.h>
int main()
{
int a;
{
int b;
}
}

a) a->b, a->b
b) a->b, b->a
c) b->a, a->b
d) b->a, b->a
Answer:b
42. Array sizes are optional during array declaration by using ______ keyword.
a) auto
b) static
c) extern
d) register

43. What is the output of this C code?

#include <stdio.h>
void main()
{
int x = 3;
{
x = 4;
printf("%d", x);
}
}

a) 4
b) 3
c) 0
d) Undefined
Answer:a

44. What is the output of this C code?

#include <stdio.h>
int x = 5;
void main()
{
int x = 3;
m();
printf("%d", x);
}
void m()
{
x = 8;
n();
}
void n()
{
printf("%d", x);
}

a) 8 3
b) 3 8
c) 8 5
d) 5 3
Answer:a
45. What is the output of this C code?

#include <stdio.h>
int x;
void main()
{
m();
printf("%d", x);
}
void m()
{
x = 4;
}

a) 0
b) 4
c) Compile time error
d) Undefined
Answer:b

46. What is the output of this C code?

#include <stdio.h>
static int x = 5;
void main()
{
int x = 9;
{
x = 4;
}
printf("%d", x);
}

a) 9
b) 5
c) 4
d) 0
Answer:c

47. What is the output of this C code?

#include <stdio.h>
void main()
{
{
int x = 8;
}
printf("%d", x);
}

a) 8
b) 0
c) Undefined
d) Compile time error
Answer:d

48.What is the output of this C code?

#include <stdio.h>
void main()
{
int x = 1, y = 0, z = 5;
int a = x && y || z++;
printf("%d", z);
}

a) 6
b) 5
c) 0
d) Varies
Answer:a

49. What is the output of this C code?

#include <stdio.h>
void main()
{
int x = 1, y = 0, z = 5;
int a = x && y && z++;
printf("%d", z);
}

a) 6
b) 5
c) 0
d) Varies
50. What is the output of this C code?

#include <stdio.h>
int main()
{
int x = 1, y = 0, z = 3;
x > y ? printf("%d", z) : return z;
}

a) 3
b) 1
c) Compile time error
d) Run time error
51. What is the output of this C code(when 1 is entered)?

#include <stdio.h>
void main()
{
double ch;
printf("enter a value btw 1 to 2:");
scanf("%lf", &ch);
switch (ch)
{
case 1:
printf("1");
break;
case 2:
printf("2");
break;
}
}

a) Compile time error


b) 1
c) 2
d) Varies
Answer:a

52. What is the output of this C code(When 1 is entered)?

#include <stdio.h>
void main()
{
char *ch;
printf("enter a value btw 1 to 3:");
scanf("%s", ch);
switch (ch)
{
case "1":
printf("1");
break;
case "2":
printf("2");
break;
}
}

a) 1
b) Compile time error
c) 2
d) Run time error
Answer:b

53. What is the output of this C code(When 1 is entered)?

#include <stdio.h>
void main()
{
int ch;
printf("enter a value btw 1 to 2:");
scanf("%d", &ch);
switch (ch)
{
case 1:
printf("1\n");
default:
printf("2\n");
}
}

a) 1
b) 2
c) 1 2
d) Run time error
Answer:c

54. What is the output of this C code(When 2 is entered)?

#include <stdio.h>
void main()
{
int ch;
printf("enter a value btw 1 to 2:");
scanf("%d", &ch);
switch (ch)
{
case 1:
printf("1\n");
break;
printf("hi");
default:
printf("2\n");
}
}

a) 1
b) hi 2
c) Run time error
d) 2
Answer:d

55. What is the output of this C code(When 1 is entered)?

#include <stdio.h>
void main()
{
int ch;
printf("enter a value btw 1 to 2:");
scanf("%d", &ch);
switch (ch, ch + 1)
{
case 1:
printf("1\n");
break;
case 2:
printf("2");
break;
}
}

a) 1
b) 2
c) 3
d) Run time error
Answer:b

56. What is the output of this C code?

#include <stdio.h>
int main()
{
int a = 1, b = 1;
switch (a)
{
case a*b:
printf("yes ");
case a-b:
printf("no\n");
break;
}
}

a) yes
b) no
c) Compile time error
d) yes no
Answer:c

57. What is the output of this C code?

#include <stdio.h>
int main()
{
int x = 97;
switch (x)
{
case 'a':
printf("yes ");
break;
case 97:
printf("no\n");
break;
}
}
a) yes
b) yes no
c) Duplicate case value error
d) Character case value error
Answer:c

58. What is the output of this C code?

#include <stdio.h>
int main()
{
float f = 1;
switch (f)
{
case 1.0:
printf("yes\n");
break;
default:
printf("default\n");
}
}

a) yes
b) yes default
c) Undefined behaviour
d) Compile time error
Answer:d

59. What is the output of this C code?

#include <stdio.h>
void main()
{
int x = 1, z = 3;
int y = x << 3;
printf(" %d\n", y);
}

a) -2147483648
b) -1
c) Run time error
d) 8
Answer:d

60.What is the output of this C code?

#include <stdio.h>
void main()
{
int x = 0, y = 2, z = 3;
int a = x & y | z;
printf("%d", a);
}

a) 3
b) 0
c) 2
d) Run time error
Answer:a

61. What is the output of this C code?

#include <stdio.h>
int main()
{
reverse(1);
}
void reverse(int i)
{
if (i > 5)
exit(0);
printf("%d\n", i);
return reverse(i++);
}

a) 1 2 3 4 5
b) 1 2 3 4
c) Compile time error
d) Stack overflow
Answer:d

62. What is the output of this C code?

#include <stdio.h>
void reverse(int i);
int main()
{
reverse(1);
}
void reverse(int i)
{
if (i > 5)
return ;
printf("%d ", i);
return reverse((i++, i));
}

a) 1 2 3 4 5
b) Segmentation fault
c) Compilation error
d) Undefined behaviour
Answer:a
63. In expression i = g() + f(), first function called depends on
a) Compiler
b) Associativiy of () operator
c) Precedence of () and + operator
d) Left to write of the expression
Answer:a

64. What is the value of i and j in the below code?

#include <stdio.h>
int x = 0;
int main()
{
int i = (f() + g()) || g();
int j = g() || (f() + g());
}
int f()
{
if (x == 0)
return x + 1;
else
return x - 1;
}
int g()
{
return x++;
}

a)i value is 1 and j value is 1


b)i value is 0 and j value is 0
c)i value is 1 and j value is undefined
d)i and j value are undefined
Answer:d

65. What is the value of i and j in the below code?

#include <stdio.h>
int x = 0;
int main()
{
int i = (f() + g()) | g(); //bitwise or
int j = g() | (f() + g()); //bitwise or
}
int f()
{
if (x == 0)
return x + 1;
else
return x - 1;
}
int g()
{
return x++;
}

a) i value is 1 and j value is 1


b) i value is 0 and j value is 0
c) i value is 1 and j value is undefined
d) i and j value are undefined
Answer:c

66. What is the output of this C code?

#include <stdio.h>
int main()
{
int x = 2, y = 0;
int z = y && (y |= 10);
printf("%d\n", z);
return 0;
}

a) 1
b) 0
c) Undefined behaviour due to order of evaluation
d) 2
Answer:a

67. What is the output of this C code?

#include <stdio.h>
int main()
{
int x = 2, y = 0;
int z = (y++) ? 2 : y == 1 && x;
printf("%d\n", z);
return 0;
}

a) 0
b) 1
c) 2
d)Undefined behaviour
Answer:b

68. What is the output of this C code?

#include <stdio.h>
int main()
{
int x = 2, y = 0;
int z;
z = (y++, y);
printf("%d\n", z);
return 0;
}

a) 0
b) 1
c) Undefined behaviour
d) Compilation error

Answer:b

69. What is the output of this C code?

#include <stdio.h>
int main()
{
int x = 2, y = 0, l;
int z;
z = y = 1, l = x && y;
printf("%d\n", l);
return 0;
}

a) 0
b) 1
c) Undefined behaviour due to order of evaluation can be different
d) Compilation error
Answer:b

70. What is the output of this C code?

#include <stdio.h>
int main()
{
int y = 2;
int z = y +(y = 10);
printf("%d\n", z);
}

a) 12
b) 20
c) 4
d) Either 12 or 20
Answer:b

71.What is the final value of j in the below code?

#include <stdio.h>
int main()
{
int i = 0, j = 0;
if (i && (j = i + 10))
//do something
;
}

a) 0
b) 10
c) Depends on the compiler
d) Depends on language standard
Answer:a

72. What is the final value of j in the below code?

#include <stdio.h>
int main()
{
int i = 10, j = 0;
if (i || (j = i + 10))
//do something
;
}

a) 0
b) 20
c) Compile time error
d) Depends on language standard
Answer:a

73. What is the output of this C code?

#include <stdio.h>
int main()
{
int i = 1;
if (i++ && (i == 1))
printf("Yes\n");
else
printf("No\n");
}

a) Yes
b) No
c) Depends on the compiler
d) Depends on the standard
Answer:b

74. function tolower(c) defined in library works for


a) Ascii character set
b) Unicode character set
c) Ascii and utf-8 but not EBSIDIC character set
d) Any character set
Answer:d

75. What is the output of the below code considering size of short int is 2, char is 1 and int is 4
bytes?

#include <stdio.h>
int main()
{
short int i = 20;
char c = 97;
printf("%d, %d, %d\n", sizeof(i), sizeof(c), sizeof(c + i));
return 0;
}

a) 2, 1, 2
b) 2, 1, 1
c) 2, 1, 4
d) 2, 2, 8
Answer:c

76. Which type conversion is NOT accepted?


a) From char to int
b) From float to char pointer
c) From negative int to char
d) From double to char
View AnswerAnswer:b

77. What will be the data type of the result of the following operation?
(float)a * (int)b / (long)c * (double)d
a) int
b) long
c) float
d) double
Answer:d

78. Which of the following type-casting have chances for wrap around?
a) From int to float
b) From int to char
c) From char to short
d) From char to int
Answer:b

79. Which of the following typecasting is accepted by C?


a) Widening conversions
b) Narrowing conversions
c) Both
d) None of the mentioned
Answer:c

80. When do you need to use type-conversions?


a) The value to be stored is beyond the max limit
b) The value to be stored is in a form not supported by that data type
c) To reduce the memory in use, relevant to the value
d) All of the mentioned
Answer: d

81.Comment on the output of this C code?

#include <stdio.h>
int main()
{
float f1 = 0.1;
if (f1 == 0.1)
printf("equal\n");
else
printf("not equal\n");
}

a) equal
b) not equal
c) Output depends on compiler
d) None of the mentionedAnswer:b

82. Comment on the output of this C code?

#include <stdio.h>
int main()
{
float f1 = 0.1;
if (f1 == 0.1f)
printf("equal\n");
else
printf("not equal\n");
}

a) equal
b) not equal
c) Output depends on compiler
d) None of the mentionedAnswer:a
83. What is the output of this C code (on a 32-bit machine)?

#include <stdio.h>
int main()
{
int x = 10000;
double y = 56;
int *p = &x;
double *q = &y;
printf("p and q are %d and %d", sizeof(p), sizeof(q));
return 0;
}

a) p and q are 4 and 4


b) p and q are 4 and 8
c) Compiler error
d) p and q are 2 and 8Answer:a

84. Which is correct with respect to size of the datatypes?


a) char > int > float
b) int > char > float
c) char < int < double
d) double > char > intAnswer:c

85. What is the output of the following C code(on a 64 bit machine)?

#include <stdio.h>
union Sti
{
int nu;
char m;
};
int main()
{
union Sti s;
printf("%d", sizeof(s));
return 0;
}

a) 8
b) 5
c) 9
d) 4Answer:d

86. What is the output of this C code?

#include <stdio.h>
int main()
{
float x = 'a';
printf("%f", x);
return 0;
}
a) a
b) run time error
c) a.0000000
d) 97.000000

Answer:d

87. Which of the datatypes have size that is variable?


a) int
b) struct
c) float
d) double

Answer:b

88.What is the output of this C code?

#include <stdio.h>
void main()
{
int a = 3;
int b = ++a + a++ + --a;
printf("Value of b is %d", b);
}

a) Value of x is 12
b) Value of x is 13
c) Value of x is 10
d) Undefined behaviour

Answer:d

89.. The precedence of arithmetic operators is (from highest to lowest)


a) %, *, /, +, -
b) %, +, /, *, -
c) +, -, %, *, /
d) %, +, -, *, /

Answer:a

90. Which of the following is not an arithmetic operation?


a) a *= 10;
b) a /= 10;
c) a != 10;
d) a %= 10;

Answer:c

91. What is the output of this C code?

#include <stdio.h>
int main()
{
int x = 2, y = 2;
float f = y + x /= x / y;
printf("%d %f\n", x, f);
return 0;
}

a) 2 4.000000
b) Compile time error
c) 2 3.500000
d) Undefined behaviour

Answer:b

92. What is the output of this C code?

#include <stdio.h>
int main()
{
int x = 1, y = 2;
if (x && y == 1)
printf("true\n");
else
printf("false\n");
}

a) true
b) false
c) Compile time error
d) Undefined behaviour

Answer:b

93. What is the output of this C code?

#include <stdio.h>
int main()
{
int x = 1, y = 2;
int z = x & y == 2;
printf("%d\n", z);
}

a) 0
b) 1
c) Compile time error
d) Undefined behaviour

Answer:b

94. What is the output of this C code?

#include <stdio.h>
int main()
{
int x = 3, y = 2;
int z = x /= y %= 2;
printf("%d\n", z);
}

a) 1
b) Compile time error
c) Floating point exception
d) Segmentation fault

Answer:c

95. What is the output of this C code?

#include <stdio.h>
int main()
{
int x = 3, y = 2;
int z = x << 1 > 5;
printf("%d\n", z);
}

a) 1
b) 0
c) 3
d) Compile time error

Answer:a

96. What is the output of this C code?


#include <stdio.h>
int main()
{
int x = 3; //, y = 2;
const int *p = &x;
*p++;
printf("%d\n", *p);
}

a) Increment of read-only location compile error


b) 4
c) Some garbage value
d) Undefined behaviour

Answer:c

97. What is the output of this C code?

#include <stdio.h>
int main()
{
int x = 2, y = 2;
int z = x ^ y & 1;
printf("%d\n", z);
}

a) 1
b) 2
c) 0
d) 1 or 2

Answer:b

98. What is the output of this C code?

#include <stdio.h>
int main()
{
int x = 2, y = 0;
int z = x && y = 1;
printf("%d\n", z);
}

a) 0
b) 1
c) Compile time error
d) 2
Answer:c

99. What is the output of the code given below

#include <stdio.h>
int main()
{
int x = 0, y = 2;
if (!x && y)
printf("true\n");
else
printf("false\n");
}

a) true
b) false
c) Compile time error
d) Undefined behaviour

Answer:a

100. What is the output of this C code?

#include <stdio.h>
int main()
{
int x = 0, y = 2;
int z = ~x & y;
printf("%d\n", z);
}

a) -1
b) 2
c) 0
d) Compile time error

Answer:b
JSPM's
Jayawantrao sawant College of EngineeringHadpsar, Pune-33
Department of Information Technology
Multiple Choice Questions

Unit-3

1. Two main measures for the efficiency of an algorithm are


a. Processor and memory
b. Complexity and capacity
c. Time and space
d. Data and space

2. The time factor when determining the efficiency of algorithm is measured by


a. Counting microseconds
b. Counting the number of key operations
c. Counting the number of statements
d. Counting the kilobytes of algorithm

3. The space factor when determining the efficiency of algorithm is measured by


a. Counting the maximum memory needed by the algorithm
b. Counting the minimum memory needed by the algorithm
c. Counting the average memory needed by the algorithm
d. Counting the maximum disk space needed by the algorithm

4. Which of the following case does not exist in complexity theory


a. Best case
b. Worst case
c. Average case
d. Null case

5. The Worst case occur in linear search algorithm when


a. Item is somewhere in the middle of the array
b. Item is not in the array at all
c. Item is the last element in the array
d. Item is the last element in the array or is not there at all
6. The Average case occur in linear search algorithm
a. When Item is somewhere in the middle of the array
b. When Item is not in the array at all
c. When Item is the last element in the array
d. When Item is the last element in the array or is not there at all

7. The complexity of the average case of an algorithm is


a. Much more complicated to analyze than that of worst case
b. Much more simpler to analyze than that of worst case
c. Sometimes more complicated and some other times simpler than that of worst case
d. None or above

8. The complexity of linear search algorithm is


a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)

9. The complexity of Binary search algorithm is


a. O(n)
b. O(log )
c. O(n2)
d. O(n log n)

11. The complexity of merge sort algorithm is


a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)

12. The indirect change of the values of a variable in one module by another module is called
a. internal change
b. inter-module change
c. side effect
d. side-module update
13. Which of the following data structure is not linear data structure?
a. Arrays
b. Linked lists
c. Both of above
d. None of above

14. Which of the following data structure is linear data structure?


a. Trees
b. Graphs
c. Arrays
d. None of above

15. The operation of processing each element in the list is known as


a. Sorting
b. Merging
c. Inserting
d. Traversal

16. Finding the location of the element with a given value is:
a. Traversal
b. Search
c. Sort
d. None of above

17. Arrays are best data structures


a. for relatively permanent collections of data
b. for the size of the structure and the data in the structure are constantly changing
c. for both of above situation
d. for none of above situation

18. Linked lists are best suited


a. for relatively permanent collections of data
b. for the size of the structure and the data in the structure are constantly changing
c. for both of above situation
d. for none of above situation

19. Each array declaration need not give, implicitly or explicitly, the information about
a. the name of array
b. the data type of array
c. the first data from the set to be stored
d. the index set of the array

20. The elements of an array are stored successively in memory cells because
a. by this way computer can keep track only the address of the first element and the
addresses of other elements can be calculated
b. the architecture of computer memory does not allow arrays to store other than serially
c. both of above
d. none of above

21. When determining the efficiency of algorithm, the space factor is measured by
a. Counting the maximum memory needed by the algorithm
b. Counting the minimum memory needed by the algorithm
c. Counting the average memory needed by the algorithm
d. Counting the maximum disk space needed by the algorithm

22. The complexity of Bubble sort algorithm is


a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)

23. Linked lists are best suited


a. for relatively permanent collections of data
b. for the size of the structure and the data in the structure are constantly changing
c. for both of above situation
d. for none of above situation

24. If the values of a variable in one module is indirectly changed by another module, this
situation is called
a. internal change
b. inter-module change
c. side effect
d. side-module update
25. In linear search algorithm the Worst case occurs when
a. The item is somewhere in the middle of the array
b. The item is not in the array at all
c. The item is the last element in the array
d. The item is the last element in the array or is not there at all

26. For an algorithm the complexity of the average case is


a. Much more complicated to analyze than that of worst case
b. Much more simpler to analyze than that of worst case
c. Sometimes more complicated and some other times simpler than that of worst case
d. None or above

27. The complexity of merge sort algorithm is


a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)

28. The complexity of linear search algorithm is


a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)

29. When determining the efficiency of algorithm the time factor is measured by
a. Counting microseconds
b. Counting the number of key operations
c. Counting the number of statements
d. Counting the kilobytes of algorithm

30. Which of the following data structure is linear data structure?


a. Trees
b. Graphs
c. Arrays
d. None of above

31. The elements of an array are stored successively in memory cells because
a. by this way computer can keep track only the address of the first element and the
addresses of other elements can be calculated
b. the architecture of computer memory does not allow arrays to store other than serially
c. both of above
d. none of above

32. Which of the following data structure is not linear data structure?
a. Arrays
b. Linked lists
c. Both of above
d. None of above

33. The Average case occur in linear search algorithm


a. When Item is somewhere in the middle of the array
b. When Item is not in the array at all
c. When Item is the last element in the array
d. When Item is the last element in the array or is not there at all

34. Two main measures for the efficiency of an algorithm are


a. Processor and memory
b. Complexity and capacity
c. Time and space
d. Data and space

35. Finding the location of the element with a given value is:
a. Traversal
b. Search
c. Sort
d. None of above

36. Which of the following case does not exist in complexity theory
a. Best case
b. Worst case
c. Average case
d. Null case

37. The operation of processing each element in the list is known as


a. Sorting
b. Merging
c. Inserting
d. Traversal

38. Arrays are best data structures


a. for relatively permanent collections of data
b. for the size of the structure and the data in the structure are constantly changing
c. for both of above situation
d. for none of above situation

39. Each array declaration need not give, implicitly or explicitly, the information about
a. the name of array
b. the data type of array
c. the first data from the set to be stored
d. the index set of the array
40. The complexity of Binary search algorithm is
a. O(n)
b. O(log )
c. O(n2)
d. O(n log n)

41.Which of the following data structure is non-linear type?


A) Strings
B) Lists
C) Stacks
D) Tree

42. Which of the following data structure is linear type?


A) Array
B) Tree
C) Graphs
D) Hierarchy

43. The logical or mathematical model of a particular organization of data is called a .........
A) Data structure
B) Data arrangement
C) Data configuration
D) Data formation

44. The simplest type of data structure is ..................


A) Multidimensional array
B) Linear array
C) Two dimensional array
D) Three dimensional array

45. Linear arrays are also called ...................


A) Straight line array
B) One-dimensional array
C) Vertical array
D) Horizontal array

46. Arrays are best data structures ............


A) For relatively permanent collections of data.
B) For the size of the structure and the data in the structure are constantly changing
C) For both of above situation
D) For none of the above

47. Which of the following data structures are indexed structures?


A) Linear arrays
B) Linked lists
C) Graphs
D) Trees

48. Each node in a linked list has two pairs of .............. and ...................
A) Link field and information field
B) Link field and avail field
C) Avail field and information field
D) Address field and link field

49. A ........................ does not keep track of address of every element in the list.
A) Stack
B) String
C) Linear array
D) Queue

50. When does top value of the stack changes?


A) Before deletion
B) While checking underflow
C) At the time of deletion
D) After deletion
JSPM's
Jayawantrao sawant College of EngineeringHadpsar, Pune-33
Department of Information Technology
Multiple Choice Questions

Unit-4

1.Which of the following best describes sorting ?


A.Accessing and processing each record exactly once
B.Finding the location of the record with a given key
C.Arranging the data (record) in some given order
D.Adding a new record to the data structure
ANSWER: C

2.The time complexity of linear search algorithm over an array of n elements is


A.O (log2 n)
B.O(n)
C.O(n log2 n)
D.0 (n2)
ANSWER: B

3.A characteristic of the data that binary search uses but the linear search ignores is
the___________
A.Order of the elements of the list
B.Length of the list
C.Maximum value in list
D.Type of elements of the list
ANSWER: A

4.The data for which you are searching is called


A.search argument
B.sorting argument
C.detection argument
D.binary argument
ANSWER: A

5.For a linear search in an array of n elements the time complexity for best, worst and average
case are ......., ....... and ........ respectively
A.O(n), O(1), and O(n/2)
B.O(1), O(n) and O(n/2)
C.O(1),O(n) and O(n)
D.O(1), O(n) and (n-1/2)
ANSWER: C
6.Which of the following is false ?
A.A serial search begins with the first array element
B.A serial search continues searching, element by element, either until a match is found or until
the end of the array is encountered
C.A serial search is useful when the amount of data that must be search is small
D.For a serial search to work, the data in the array must be arranged in either alphabetical or
numerical order
ANSWER: D

7.The average successful search time for sequential search on 'n' items is
A.n/2
B.(n-1)/2
C.(n+1)/2
D.log (n)+1
ANSWER: C

8.A search begins the search with the element that is located in the middle of the array
A.serial
B.random
C.parallel
D.binary
ANSWER: D

9.Suppose DATA array contains 1000000 elements. Using the binary search algorithm, one
requires only about n comparisons to find the location of an item in the DATA array, then n is
A.60
B.45
C.20
D.None of these
ANSWER: C

10.Which of the following is false ?


A.A binary search begins with the middle element in the array
B.A binary search continues having the array either until a match is found or until there are no
more elements to search
C.If the search argument is greater than the value located in the middle of the binary, the binary
search continues in the upper half of the array
D.For a binary search to work, the data in the array must be arranged in either alphabetical or
numerical order
ANSWER: C

11.The order of the binary search algorithm is


A.n
B.n2
C.nlog(n)
D.log(n)
ANSWER: Option D

12.Sorting is useful for


A.report generation
B.respondingtoe queries easily
C.making searching easier and efficient
D.All of these
ANSWER: D

13.Choose the correct statements


A.Internal sorting is used if the number of items to be sorted is very large.
B.External sorting is used if the number of items to be sorted is very large
C.External sorting needs auxilary storage
D.Both (b) & (c)
ANSWER: D

14.A sort which compares adjacent elements in a list and switches where necessary is
A.insertion sort
B.heap sort
C.quick sort
D.bubble sort
ANSWER: D

15.Which of the following sorting methods would be most suitable for sorting a list which is
almost sorted
A.Bubble Sort
B.Insertion Sort
C.Selection Sort
C.Quick Sort
ANSWER: A

16.Which of the following sorting procedure is the slowest ?


A.Quick sort
B.Heap sort
C.Shell sort
D.Bubble sort
ANSWER: D

17.The number of swappings needed to sort the numbers 8, 22, 7, 9, 31, 19, 5, 13 in ascending
order, using bubble sort is
A.11
B.12
C.13
D.14
ANSWER: D

18.A machine took 200 sec to sort 200 names, using bubble sort. In 800 sec, it can approximately
sort
A.400 names
B.800 names
C.750 names
D.800 names
ANSWER: A

19.Given a file of size n the number of times a given file is passed through in bubble sort is
A.n2
B.n - 1
C.n log n
ANSWER: B

20.In bubble sort, for a file of size n, after p iterations number of records in proper positions is
A.n - p
B.n - p + 1
C.p
ANSWER: A

21.A sort which iteratively passes through a list to exchange the first element with any element
less than it and then repeats with a new first element is called
A.insertion sort
B.selection sort
C.heap sort
D.quick sort
ANSWER: B

22.Which of the following sorting methods will be the best if number of swappings done, is the
only measure of efficienty?
A.Bubble sort
B.Selection sort
C.Insertion sort
D.Quick sort
ANSWER: B
23.What is the number of swaps required to sort n elements using selection sort, in the worst
case?
A.T(n)
B.T(n log n)
C.T(n2)
D.T(n2 log n)
ANSWER: A

24.Staright selection sort is basically a method of repeated


A.interchange
B.searching
C.position adjustment
ANSWER: C

25.Number of selections required to sort a file of size N by straight selection requires


a.N - 1
b.log N
c.O(N2)
ANSWER: A

26.For sorting a file of size n by straight selection sort, the number of comparisons made in the
first pass is
a.n
b.n - 1
c.n(n - 1)/2
ANSWER: B

27.Which of the following sorting method is stable ?


A.insertion sort
B.Quick sort
C.Shell sort
D.Heap sort
ANSWER: A

28.You have to sort a list L consisting of a sorted list followed by a few “random”
elements.Which of the following sorting methods would be especially suitable for such a task?
A.Bubble sort
B.Selection sort
C.Quick sort
D.Insertion sort
Ans:D
29.Which of the following sorting methods would be most suitable for sorting a list which is
already sorted
A.Bubble Sort
B.Insertion Sort
C.Selection Sort
C.Quick Sort
ANSWER: B

30.The way a card game player arranges his cards as he picks them up one by one, is an example
of
A.bubble sort
B.Selection sort
C.insertion sort
D.merge sort
ANSWER: C

31.You want to check whether a given set of items is sorted. Which of the following sorting
methods will be most efficient if it is already in sorted order?
A.Bubble sort
B.Selection sort
C.Insertion sort
D.Merge Sort
ANSWER: C

32.Which of the following sorting algorithms does not have a worst case running time of O(n2)?
A.Insertion sort
B.Merge sort
C.Quick sort
D.Bubble sort
ANSWER: B

33.Merge sort uses


A.divide and conquer strategy
B.backtracking approach
C.heuristic search
D.greedy approach
ANSWER: A

34.Assume 5 buffer pages are available to sort a file of 105 pages. The cost of sorting using m-
way merge sort is
A.206
B.618
C.840
D.926
ANSWER: C

35.A desirable choice for the partitioning element in quick sort is


A.First element of the list
B.Last element of the list
C.Randomly chosen element of the list
D.Median of the list
Answer: A

36.Quick sort is also known as


A.Merge sort
B.Heap sort
C.Bubble sort
C.None of these
ANSWER: D

37.A sort which relatively passes through a list to exchange the first element with any element
less than it and then repeats with a new first element is called
A.Insertion sort
B.Selection sort
C.Heap sort
D.Quick sort
ANSWER: D

39.The best average behaviour is shown by


38.A.Quick Sort
B.Merge Sort
C.Insertion Sort
C.Heap Sort
ANSWER: A

40.Which of the following sorting methods sorts a given set of items that is already in sorted
order or in reverse sorted order with equal speed?
A.Heap sort
B.Quick sort
C.Insertion sort
D.Selection sort
ANSWER: B

41.A machine needs a minimum of 100 sec to sort 1000 names by quick sort. The minimum time
needed to sort 100 names will be approximately
A.50.2 sec
B.6.7 sec
C.72.7 sec
D.11.2 sec
ANSWER: B

42.Which of the following is useful in implementing quick sort?


A.Stack
B.Set
C.List
D.Queue
ANSWER: A

43.In quick sort, for sorting n elements, the (n/4)th smallest element is selected as pivot using an
T(n) time algorithm. What is the worst case time complexity of the quick sort?
A.T(n)
B.T(n log n)
C.T(n2)
D.T(n2 log n)
ANSWER: B

44.The running time of the following sorting algorithm depends on whether the partitioning is
balanced or unbalanced
A.Insertion sort
B.Selection sort
C.Quick sort
D.Merge sort
ANSWER: C

45.In worst case Quick Sort has order


A.O (n log n)
B.O (n^2/2)
C.O (log n)
D.O (n2/4)
ANSWER: B

46.In quick sort, the number of partitions into which the file of size n is divided by a selected
record is
A.n
B.n - 1
C.2
ANSWER: C

47.The total number of comparisons made in quick sort for sorting a file of size n, is
a.O(n log n)
b.O(n2)
c.n(log n)
ANSWER: A

48.Quick sort efficiency can be improved by adopting


a.non-recursive method
b.insertion method
c.tree search method
ANSWER: A

49.For the improvement of efficiency of quick sort the pivot can be


a.the first element
b.the mean element
c.the last element
ANSWER: B

50.Quick sort is the fastest available method of sorting because of


a.low over head
b.O(n log n) comparisons
c.lowover head and also O(n log n) comparisons
ANSWER: C

51.A sorting technique that guarantees that records with the same primary key occurs in the same
order in the sorted list as in the original unsorted list is said to be
A.stable
B.consistent
C.External
D.linear
ANSWER: A
JSPM's
Jayawantrao Sawant College Of Engineering, Hadapsar,Pune-28
Department of Information Technology

Multiple Choice Questions


UNIT-II

Class: SE IT Subject: FDS

1) The value of eof is


a) -1
b) 1
c) 0
d) 10
ans:a

2) What is FILE in following declaration?


a) Keyword
b) File
c) Structure
d) Array

2) Which is file opening mode?


a) r
b) w
c) wb
d) all of the above

3) choose correct declaration


a) int main(intargc,char *argv)

{}

b) int main(intargc,char *argv[])


{}
c) int main(int *argc,char *argv)
{}
d) int main()
{int *argc,char *argv}

Ans D

4) what is output of the following program?


Void main()
{
File *fp;
Fp=fopen(“d:\\input,dat”,”w”);
Printf(“%d\n”,ferror(fp));0
}
a) 0
b) -1
c) 1
d) None of these

5) Which of the following file type can’t be opened using fopen()?


a) .txt
b) .dat
c) .bin
d) None of these

6) How to call a function without using the function name to send parameters?
a) typedefs
b) Function pointer
c) Both (a) and (b)
d) None of the mentioned
Answer:b

7) Correct syntax to pass a Function Pointer as an argument


a) void pass(int (*fptr)(int, float, char)){}
b) void pass(*fptr(int, float, char)){}
c) void pass(int (*fptr)){}
d) void pass(*fptr){}
Answer:a
8. Which of the following is not possible in C?
a) Array of function pointer
b) Returning a function pointer
c) Comparison of function pointer
d) None of the mentioned

Answer:d

9. What is the output of this C code?

#include <stdio.h>
void first()
{
printf("Hello World");
}
void main()
{
void *ptr() = first;
ptr++
ptr();
}

a) Illegal application of ++ to void data type


b) pointer function initialized like a variable
c) Both (a) and (b)
d) None of the mentioned

Answer:c

10) What will be output of the following?

void main()
{
Inta[]={1,2,3,4,5},j;
For(j=0;j<5;j++)
{
Printf(“%d”,*a);
a++;
}
}
a) Syntax error
b) Run time error
c) 12345
d) Garbage 1234

11) what will be output of following?

#include<stdio.h>
Void main()
{
Int a=10;
Int*b=&a;
Int**c=&b;
**c=20;
Printf(“%d”,a);
}
a) 10
b) 20
c) Garbage value
d) Syntax error

12) what will be o/p of following code?

Void main()
{
Intarr[]={10,20,30};
Int *p=arr;
Int *q=&p;
Printf(“%d”,(**q));
}

a) 10
b) 20
c) Sytax error
d) Runtime error

13) Output of following code?

Intmain()
{
Char *str;
Str=”%d\n”;
Str++;
Str++;
Printf(str-2,500);
Return 0;
}
a) 5
b) 50
c) 500
d) No o/p

14) how many no. Of pointer to pointer can be declared in C?

a) 7
b)127
c)255
d)no limit Ans:d

15) what is o/p of code?

Intmain()
{
Int i=10,*a;
Void *b;
a=b=&i;
printf(“%u%u”,a++,b++);
return 0;
}
a) 10 garbage value
b) Add will be display twice
c) Syntax error
d) None of these

16) Pointers are supported in

a. C
b. Fortron
c. Pascal
d. Both b&c ans:d
17)Identify invalid expression

a)&274

b)&(a+b)

c)&(a*b)

d)all of the above ans:d

18)main()

Int a=5;

Ptr=&a;

Printf(“%d”,++*ptr);

Output will be:

a)6

b)5

c)0

d)none

ans:a

19)Number of argument use in malloc is

a) 0
b) 1
c) 2
d) 3
ans:1
20) The no. Of argument use in realloc is
a) 0
b) 1
c) 2
d) 3
ans:c
21) the function is use in dynamic deallocation is
a) Destroy()
b) Delet()
c) Free
d) Remove()
ans:c

22) the function call realloc(ptr,0)is


a) Same as free (ptr)

b) Used to set the value of ptr to be 0

c) the value of in the address represented by ptr

d) Invalid

ans:a

23) pointers can be used to achive


a) Call by function
b) Call by refrance
c) Call by name
d) Call y procedure
ans:b

24) the declaration of float *a[5] is

a) An ordinary array
b) A pointer to an array
c) Ann array to an pointer
d) Pointer to an array
ans:c

25) The declaration int (*p)[8];


a) An array of pointer
b) A pointer to an array
c) Pointer to function
d) Function returing pointer
ans:b

26) Given int a[5][5];identify the correct expression ,yielding the starting element.
a) *a[0]
b) **a
c) a[0][0]
d) all of these
ans:d

27) Given int x[5][5][5];find value of the element x[2][3][4]


a) *(x[2][3]+4)
b) *(*(x[2]+3)+4)
c) *(*(*(x+2)+3)+4)
d) All of the above

28)The oprators used in pointr is


a) *and/
b) &and*
c) &and|
d) –and>

ans:b

29) main()
{
Inta[5]={-2,-1,3,4,5}
Int*b;
b=&a[2];
}
Then value of b[-1] is:
a) 4
b) 3
c) -1
d) -2
ans:c
30)identify invalid pointer oprator
a) &
b) >>
c) *
d) None of these
ans:b

31)Identify the wrong declaration statement.

a)int *p,a=10;

b)int a=10,*p=&a;

c)int *p=&a,a=10

d)options a and b

32) Identify the invalid expression given

intnum=15,*p=&num;

a)*num

b)*(&num)

c)*&*&num

d)**&p

33) Identify the invalid expression given float x=2.14,*y=&x;

a)&y

b)*&x

c)**&y

d)(*&)x

34)The operand of the address of operator is

a)a constant

b)an expression

c)a named region of storage

d)a register variable


35)How does compiler differentiate address of operator from bitwise AND operator?

a)by using the number of operands and the position of operands

b)by seeing the declarations

c)both options a and b

d)by using the value of the operand

36)How does compiler differentiate indirection operator from multiplication operator?

a) by using the number of operands

b) by seeing the position of operands

c) both options a and b

d)by using the value of the operand

37)The address of operator returns

a)the address of its operand

b)lvalue

c) both options a and b

d)rvalue

38)The indirection operator returns

a)the data object stored in the address represented by its operand

b)lvalue

c)both options a and b

d)rvalue
39)The operand of indirection operator is

a)pointer variable

b)pointer expression

c)both options a and b

d)ordinary variable

40)The operand of address of operator may be

a)an ordinary variable

b)an array variable

c)a pointer variable

d)Any one of above

41)Identify the invalid lvalue given int x,*p=&x;

a)*(p+1)

b)*(p-3)

c)both options a and b

d)&x

42)After the execution of statement int x; the value of x is

a)0

b)undefined

c)1

d)-1

43)Pointer variable may be initialized using


a)static memory allocation

b)dynamic memory allocation

c)both options a and b

d)a positive integer

44)Given the declaration double prec[5]; the address of element prec[2]is obtained

a)&prec[2]

b)prec+2

c)both options a and b

d)*(prec+2)

45)Identify the correct statement for given expression

floatfnum[10];

a)fnum is pointer variable

b)fnum is fixed address and not a variable.

c)fnum is an array variable

d)fnum is an address that can be modified.

46)Which is the correct function header for function main()?

a)main(intargc, char *argv[])

b)main(intargc, char **argv)

c)main(intargc, char *av[])

d)all the above

47)The invalid address arithmetic is


a)adding two pointers

b)multiplying two pointers

c)dividing two pointers

d)all the above

48)Identify the invalid assignment,for given int *p,x;

a)p=0;

b)p=255864u

c)p=&x

d)*p=10

49)Identify the invalid expression for given syntax:

float fnum[10],*fptr=fnum;

a)fnum+4

b)fnum[4]

c)fnum=++fptr

d)&fnum[4]

50)The operators &,*,++ and – have

a)same procedure level and same associativity

b)same associativity and different precedence level

c)different precedence level and different associativity

d)different precedence level and same associativity


51.What is the output of this C code?

#include <stdio.h>
int mul(int a, int b, int c)
{
return a * b * c;
}
void main()
{
int (*function_pointer)(int, int, int);
function_pointer = mul;
printf("The product of three numbers is:%d",
function_pointer(2, 3, 4));
}

a) The product of three numbers is:24


b) Run time error
c) Nothing
d) Varies

Answer:a

52. What is the output of this C code?

#include <stdio.h>
int mul(int a, int b, int c)
{
return a * b * c;
}
void main()
{
int (function_pointer)(int, int, int);
function_pointer = mul;
printf("The product of three numbers is:%d",
function_pointer(2, 3, 4));
}

a) The product of three numbers is:24


b) Compile time error
c) Nothing
d) Varies

Answer:b
53. What is the output of this C code?

#include <stdio.h>
void f(int (*x)(int));
int myfoo(int);
int (*fooptr)(int);
int ((*foo(int)))(int);
int main()
{
fooptr = foo(0);
fooptr(10);
}
int ((*foo(int i)))(int)
{
return myfoo;
}
int myfoo(int i)
{
printf("%d\n", i + 1);
}

a) 10
b) 11
c) Compile time error
d) Undefined behaviour

Answer:b

54. Which is an indirection operator among the following?


a) &
b) *
c) ->
d) .

Answer:b

55. Which of the following does not initialize ptr to null (assuming variable declaration of a as
int a=0;?
a) int *ptr = &a;
b) int *ptr = &a – &a;
c) int *ptr = a – a;
d) All of the mentioned

Answer:a

56. What is the output of this C code?

#include <stdio.h>
int x = 0;
void main()
{
int *ptr = &x;
printf("%p\n", ptr);
x++;
printf("%p\n ", ptr);
}

a) Same address
b) Different address
c) Compile time error
d) Varies

Answer:a

57. What is the output of this C code?

#include <stdio.h>
int x = 0;
void main()
{
int *const ptr = &x;
printf("%p\n", ptr);
ptr++;
printf("%p\n ", ptr);
}

a) 0 1
b) Compile time error
c) 0xbfd605e8 0xbfd605ec
d) 0xbfd605e8 0xbfd605e8

Answer:b
58. What is the output of this C code?

#include <stdio.h>
void main()
{
int x = 0;
int *ptr = &x;
printf("%p\n", ptr);
ptr++;
printf("%p\n ", ptr);
}

a) 0xbfd605e8 0xbfd605ec
b) 0xbfd605e8 0cbfd60520
c) 0xbfd605e8 0xbfd605e9
d) Run time error

Answer:a

59. What is the output of this C code?

#include <stdio.h>
void main()
{
int x = 0;
int *ptr = &5;
printf("%p\n", ptr);
}

a) 5
b) Address of 5
c) Nothing
d) Compile time error

Answer:d

60. What is the output of this C code?

#include <stdio.h>
void main()
{
int k = 5;
int *p = &k;
int **m = &p;
**m = 6;
printf("%d\n", k);
}

a) 5
b) Compile time error
c) 6
d) Junk

Answer:c

61. What is the output of this C code?

#include <stdio.h>
void main()
{
int a[3] = {1, 2, 3};
int *p = a;
int *r = &p;
printf("%d", (**r));
}

a) 1
b) Compile time error
c) Address of a
d) Junk value

Answer:b

62. What is the output of this C code?

#include <stdio.h>
void main()
{
int a[3] = {1, 2, 3};
int *p = a;
int **r = &p;
printf("%p %p", *r, a);
}

a) Different address is printed


b) 1 2
c) Same address is printed.
d) 1 1

Answer:c

63. How many number of pointer (*) does C have against a pointer variable declaration?
a) 7
b) 127
c) 255
d) No limits.

Answer:d

64. What is the output of this C code?

#include <stdio.h>
int main()
{
int a = 1, b = 2, c = 3;
int *ptr1 = &a, *ptr2 = &b, *ptr3 = &c;
int **sptr = &ptr1; //-Ref
*sptr = ptr2;
}

a) ptr1 points to a
b) ptr1 points to b
c) sptr points to ptr2
d) None of the mentioned

Answer:b

65. What is the output of this C code?

#include <stdio.h>
void main()
{
int a[3] = {1, 2, 3};
int *p = a;
int **r = &p;
printf("%p %p", *r, a);
}
a) Different address is printed
b) 1 2
c) Same address is printed.
d) 1 1

Answer:c

66. What substitution should be made to //-Ref such that ptr1 points to variable C?

#include <stdio.h>
int main()
{
int a = 1, b = 2, c = 3;
int *ptr1 = &a;
int **sptr = &ptr1;
//-Ref
}

a) *sptr = &c;
b) **sptr = &c;
c) *ptr1 = &c;
d) None of the mentioned.

Answer:a

67. Which of the following declaration throw run-time error?


a) int **c = &c;
b) int **c = &*c;
c) int **c = **c;
d) None of the mentioned

Answer:d

68. Comment on the output of this C code?

#include <stdio.h>
int main()
{
int a = 10;
int **c -= &&a;
}

a) You cannot apply any arithmetic operand to a pointer.


b) We don’t have address of an address operator
c) Both (a) and (b)
d) None of the mentioned.

Answer:b

69. What is the output of this C code?

#include <stdio.h>
void main()
{
int a[3] = {1, 2, 3};
int *p = a;
int *r = &p;
printf("%d", (**r));
}

a) 1
b) Compile time error
c) Address of a
d) Junk value

Answer:b

70. Comment on the output of this C code?

#include <stdio.h>
int main()
{
char *str = "This" //Line 1
char *ptr = "Program\n"; //Line 2
str = ptr; //Line 3
printf("%s, %s\n", str, ptr); //Line 4
}

a) Memory holding “this” is cleared at line 3


b) Memory holding “this” loses its reference at line 3
c) You cannot assign pointer like in Line 3
d) Output will be This, Program

Answer:b

71. What type initialization is needed for the segment “ptr[3] = ’3′;” to work?
a) char *ptr = “Hello!”;
b) char ptr[] = “Hello!”;
c) Both (a) and (b)
d) None of the mentioned

Answer:b

73. The syntax for constant pointer to address (i.e., fixed pointer address) is:

a) const <type> * <name>


b) <type> * const <name>
c) <type> const * <name>
d) Both (a) and (c)
Answer:b

74. Comment on the output of this C code?

#include <stdio.h>
int add(int a, int b)
{
return a + b;
}
int main()
{
int (*fn_ptr)(int, int);
fn_ptr = add;
printf("The sum of two numbers is: %d", (int)fn_ptr(2, 3));
}

a) Compile time error, declaration of a function inside main.


b) Compile time error, no definition of function fn_ptr.
c) Compile time error, illegal application of statement fn_ptr = add.
d) No Run time error, output is 5.

Answer:d
75. The correct way to declare and assign a function pointer is done by:
(Assuming the function to be assigned is “int multi(int, int);”)
a) int (*fn_ptr)(int, int) = multi;
b) int *fn_ptr(int, int) = multi;
c) int *fn_ptr(int, int) = &multi;
d) Both (b) & (c)

Answer:a

76. Calling a function f with a an array variable a[3] where a is an array, is equivalent to
a) f(a[3])
b) f(*(a + 3))
c) f(3[a])
d) All of the mentioned

Answer:d

77. What is the output of this C code?

#include <stdio.h>
void f(char *k)
{
k++;
k[2] = 'm';
}
void main()
{
char s[] = "hello";
f(s);
printf("%c\n", *s);
}

a) h
b) e
c) m
d) o;

Answer:a

78.What is the output of this C code?


#include <stdio.h>
void main()
{
char s[] = "hello";
s++;
printf("%c\n", *s);
}

a) Compile time error


b) h
c) e
d) o

Answer:a

81. What is the output of this C code?

#include <stdio.h>
struct student
{
char *c;
};
void main()
{
struct student m;
struct student *s = &m;
s->c = "hello";
printf("%s", s->c);
}

a) hello
b) Run time error
c) Nothing
d) Depends on compiler

Answer:a

82. What is the output of this C code?

#include <stdio.h>
struct student
{
char *c;
};
void main()
{
struct student *s;
s->c = "hello";
printf("%s", s->c);
}

a) hello
b) Segmentation fault
c) Run time error
d) Nothing

Answer:b

83. What is the output of this C code?

#include <stdio.h>
struct student
{
char *c;
};
void main()
{
struct student m;
struct student *s = &m;
s->c = "hello";
printf("%s", m.c);
}

a) Run time error


b) Nothing
c) hello
d) Varies

Answer:c

84. What is the output of this C code?

#include <stdio.h>
struct student
{
char *c;
};
void main()
{
struct student m;
struct student *s = &m;
(*s).c = "hello";
printf("%s", m.c);
}

a) Run time error


b) Nothing
c) Varies
d) hello

Answer:d

85. What is the output of this C code?

#include <stdio.h>
struct student
{
char *c;
};
void main()
{
struct student n;
struct student *s = &n;
(*s).c = "hello";
printf("%p\n%p\n", s, &n);
}

a) Different address
b) Run time error
c) Nothing
d) Same address

Answer:d

86. What is the output of this C code?

#include <stdio.h>
struct p
{
int x[2];
};
struct q
{
int *x;
};
int main()
{
struct p p1 = {1, 2};
struct q *ptr1;
ptr1->x = (struct q*)&p1.x;
printf("%d\n", ptr1->x[1]);
}

a) Compile time error


b) Segmentation fault/code crash
c) 2
d) 1

Answer:b

87. What is the output of this C code?

#include <stdio.h>
struct p
{
int x[2];
};
struct q
{
int *x;
};
int main()
{
struct p p1 = {1, 2};
struct q *ptr1 = (struct q*)&p1;
ptr1->x = (struct q*)&p1.x;
printf("%d\n", ptr1->x[0]);
}

a) Compile time error


b) Undefined behaviour
c) Segmentation fault/code crash
d) 1

Answer:b
88. What is the output of this C code?

#include <stdio.h>
struct p
{
int x;
int y;
};
int main()
{
struct p p1[] = {1, 2, 3, 4, 5, 6};
struct p *ptr1 = p1;
printf("%d %d\n", ptr1->x, (ptr1 + 2)->x);
}

a) 1 5
b) 1 3
c) Compile time error
d) 1 4

Answer:a

89. What is the output of this C code?

#include <stdio.h>
struct p
{
int x;
char y;
};
int main(){
struct p p1[] = {1, 92, 3, 94, 5, 96};
struct p *ptr1 = p1;
int x = (sizeof(p1) / sizeof(struct p));
printf("%d %d\n", ptr1->x, (ptr1 + x - 1)->x);
}

a) Compile time error


b) Undefined behaviour
c) 1 3
d) 1 5

Answer:d
91. What is the output of this C code (considering sizeof char is 1 and pointer is 4)?

#include <stdio.h>
int main()
{
char *a[2] = {"hello", "hi"};
printf("%d", sizeof(a));
return 0;
}

a) 9
b) 4
c) 8
d) 10

Answer:c

92. What is the output of this C code?

#include <stdio.h>
int main()
{
char a[2][6] = {"hello", "hi"};
printf("%d", sizeof(a));
return 0;
}

a) 9
b) 12
c) 8
d) 10

Answer:b

93. What is the output of this C code?

#include <stdio.h>
int main()
{
char a[2][6] = {"hello", "hi"};
printf("%s", *a + 1);
return 0;
}
a) hello
b) hi
c) ello
d) ello hi

Answer:c

94. What is the output of this C code?

#include <stdio.h>
int main()
{
char *a[2] = {"hello", "hi"};
printf("%s", *(a + 1));
return 0;
}

a) hello
b) ello
c) hi
d) ello hi

Answer:c

95. Advantage of a multi-dimension array over pointer array.


a) Pre-defined size.
b) Input can be taken from user.
c) Faster Access.
d) All of the mentioned

Answer:d

96. Which of the following operation is possible using a pointer char?


(Assuming declaration char *a;)
a) Input via %s
b) Generation of multidimensional array
c) Changing address to point at another location
d) All of the mentioned
Answer:c

97. Comment on the following two operations?


int *a[] = {{1, 2, 3}, {1, 2, 3, 4}}; //- 1
int b[4][4] = {{1, 2, 3}, {1, 2, 3, 4}};//- 2
a) 1 will work, 2 will not
b) 1 and 2, both will work
c) 1 won’t work, 2 will work
d) Neither of them will work

Answer:c

98. Comment on the following two operations?


int *a[] = {{1, 2, 3}, {1, 2, 3, 4}}; //- 1
int b[][] = {{1, 2, 3}, {1, 2, 3, 4}}; //- 2
a) 1 works, 2 doesn’t
b) 2 works, 1 doesn’t
c) Both of them work
d) Neither of them work

Answer:d

99. What does argv and argc indicate in command-line arguments?


(Assuming: int main(int argc, char *argv[]) )
a) argument count, argument variable
b) argument count, argument vector
c) argument control, argument variable
d) argument control, argument vector

Answer:b

100. Which of the following syntax is correct for command-line arguments?


a) int main(int var, char *varg[])
b) int main(char *argv[], int argc)
c) int main()
{
int argv, char *argc[];
}
d) Both (a) and (b)

Answer:a

101. In linux, argv[0] by command-line argument can be occupied by


a) ./a.out
b) ./test
c) ./fun.out.out
d) All of the mentioned

Answer:d

102. What type of array is generally generated in Command-line argument?


a) Single dimension array
b) 2-Dimensional Square Array
c) Jagged Array
d) 2-Dimensional Rectangular Array

Answer:c

103. What would be the output if we try to execute following segment of code (assuming the
following input “cool brother in city”)?
printf(“%s\n”, argv[argc]);
a) (null)
b) City
c) In
D. Segmentation Fault

Answer:a

104. The first argument in command line arguments is


a) The number of command-line arguments the program was invoked with;
b) A pointer to an array of character strings that contain the arguments
c) Nothing
d) Both a & b
105. The second (argument vector) in command line arguments is
a) The number of command-line arguments the program was invoked with;
b) A pointer to an array of character strings that contain the arguments,one per string.
c) Nothing
d) Both a & b

Answer:b

106. argv[0] in command line arguments, is


a) The name by which the program was invoked
b) The name of the files which are passed to the program
c) Count of the arguments in argv[] vector
d) Both a & b

Answer:a
Question: 1
A data structure in which linear sequence is maintained by pointers is known as
(A) Array
(B) Stack
(C) Linked list
(D) Pointer-based data structure
Ans: C
Linked list
Question: 2
Which of the following data structure works on the principle of First Come First
Serve?
(A) Priority queue
(B) Heap
(C) Stack
(D) Queue
Ans: D
Queue
Question: 3
A ____ is a linear collection of self-referential structures, called nodes, connected by
pointer links.
(A) Queue
(B) Linked list
(C) Tree
(D) Stack
Ans: B
Linked list
Question: 4
A queue where all elements have equal priority is a
(A) ILFO data structure
(B) LILO data structure
(C) FIFO data structure
(D) LIFO data structure
Ans: C
FIFO data structure
Question: 5
A file that is only read by a program is known as ____
(A) Input file
(B) Temporary file
(C) Work file
(D) Input/output file
Ans: A
Input file

Question: 6
Which of the following sorting algorithm is the slowest?
(A) Bubble sort
(B) Heap sort
(C) Shell sort
(D) Quick sort
Ans: A
Bubble sort
Question: 7
Which of the following data structure can be used to represent many-to-many
relation?
(A) B-tree
(B) Binary tree
(C) Graph
(D) All of above
Ans: C
Graph
Question: 8
Which of the following statement is not true about linked lists?
(A) Element in a linked list, if it is sorted, can be quickly searched by applying binary
search technique
(B) Elements are not necessarily stored in contiguous locations
(C) Insertions and deletions can be performed efficiently as compared to arrays
(D) Linked list is a dynamic structure
Ans: A
Element in a linked list, if it is sorted, can be quickly searched by applying binary
search technique
Question: 9
Which of the following is not a linear data structure?
(A) Stack
(B) Queue
(C) Linked list
(D) Binary tree
Ans: D
Binary tree
Question: 10
Which of the following data structure permits insertion and deletion operations only
on one end of the structure?
(A) Linked list
(B) Array
(C) Stack
(D) Queue
Ans: C
Stack

Question: 1
Which of the following data structure is more appropriate to represent a heap?
(A) Two-dimensional array
(B) Doubly linked list
(C) Linear Array
(D) Linked list
Ans: C
Linear Array
Question: 2
Minimum number of fields in each node of a doubly linked list is ____
(A) 2
(B) 3
(C) 4
(D) None of the above
Ans: B
3
Question: 3
A graph in which all vertices have equal degree is known as ____
(A) Complete graph
(B) Regular graph
(C) Multi graph
(D) Simple graph
Ans: A
Complete graph
Question: 4
A vertex of in-degree zero in a directed graph is called a/an
(A) Root vertex
(B) Isolated vertex
(C) Sink
(D) Articulation point
Ans: C
Sink
Question: 5
A graph is a tree if and only if graph is
(A) Directed graph
(B) Contains no cycles
(C) Planar
(D) Completely connected
Ans: B
Contains no cycles

Question: 6
Which of the following piece of information does the data type to the compiler
provide?
(A) The way the data is to be interpreted
(B) Range of values
(C) Amount of memory a data element uses
(D) All of above
Ans: D
All of above
Question: 7
The elements of a linked list are stored
(A) In a structure
(B) In an array
(C) Anywhere the computer has space for them
(D) In contiguous memory locations
Ans: C
Anywhere the computer has space for them
Question: 8
A parentheses checker program would be best implemented using
(A) List
(B) Queue
(C) Stack
(D) Any of the above
Ans: C
Stack
Question: 9
To perform level-order traversal on a binary tree, which of the following data
structure will be required?
(A) Hash table
(B) Queue
(C) Binary search tree
(D) Stack
Ans: B
Queue
Question: 10
Which of the following data structure is required to convert arithmetic expression in
infix to its equivalent postfix notation?
(A) Queue
(B) Linked list
(C) Binary search tree
(D) None of above
Ans: D
None of above

Question: 11
A binary tree in which all its levels except the last, have maximum numbers of nodes,
and all the nodes in the last level have only one child it will be its left child. Name the
tree.
(A) Threaded tree
(B) Complete binary tree
(C) M-way search tree
(D) Full binary tree
Ans: B
Complete binary tree
Question: 12
Which of following data structure is more appropriate for implementing quick sort
iteratively?
(A) Deque
(B) Queue
(C) Stack
(D) Priority queue
Ans: C
Stack
Question: 13
The number of edges in a complete graph of n vertices is
(A) n(n+1)/2
(B) n(n-1)/2
(C) n2/2
(D) n
Ans: B
n(n-1)/2
Question: 14
If two trees have same structure and but different node content, then they are called
___
(A) Synonyms trees
(B) Joint trees
(C) Equivalent trees
(D) Similar trees
Ans: D
Similar trees
Question: 15
If two trees have same structure and node content, then they are called ____
(A) Synonyms trees
(B) Joint trees
(C) Equivalent trees
(D) Similar trees
Ans: C
Equivalent trees

Question: 1
What is the worst-case time for serial search finding a single item in an array?
(A) Quadratic time
(B) Linear time
(C) Logarithmic time
(D) Constant time
Ans: B
Linear time
Question: 2
A non-circular doubly linked list can best and most generally be defined as a ___
(A) Set of elements, each with two pointers
(B) Set of elements chained together with pointers
(C) Linear sequence of elements in sequential memory locations
(D) Linear sequence of elements chained together with pointers
Ans: D
Linear sequence of elements chained together with pointers
Question: 3
Which of the following operations is a dictionary operation?
(A) Search
(B) Delete
(C) Insert
(D) All of above
Ans: D
All of above
Question: 4
To create a linked structure, each node must have one member, which is ____
(A) A pointer to the head of the list
(B) A pointer to NULL
(C) A pointer to the node type
(D) A reference to the element type
Ans: C
A pointer to the node type
Question: 5
Each attribute of an entity has a defined set of values. This set of values is called a
(A) Mapping
(B) Entity set
(C) Domain
(D) Range
Ans: C
Domain

Question: 6
Which of the following is not an open addressing technique to resolve collisions?
(A) Linear probing
(B) Cubic probing
(C) Double hashing
(D) Quadratic probing
Ans: B
Cubic probing
Question: 7
Which of the following file organizations is not suitable for an interactive application?
(A) Indexed sequential file organization
(B) Inverted file organization
(C) Sequential file organization
(D) Relative file organization
Ans: C
Sequential file organization
Question: 8
Which of following is not a type of a I/O channel?
(A) Block multiplexer
(B) Multiplexer
(C) Selector
(D) Demultiplexer
Ans: D
Demultiplexer

Question: 1
The average case complexity of quick sort for sorting n numbers is
(A) O(n2)
(B) O(nlog2n)
(C) O(n)
(D) O(log2n)
Ans: B
O(nlog2n)
Question: 2
A dequeue operation removes an element
(A) From the front of the queue
(B) From any place in the queue
(C) From the rear of the queue
(D) None of above
Ans: A
From the front of the queue
Question: 3
What is the minimum number of nodes in a complete binary tree with depth 3?
(A) 4
(B) 5
(C) 6
(D) 7
Question: 4
What is the number of nodes in a full binary tree with depth 3?
(A) 5
(B) 6
(C) 7
(D) 8
Ans: C
7
Question: 5
Which of the following operation is not supported by a queue?
(A) Inserting element at rear
(B) Removing element from front
(C) Removing element from middle
(D) None of above
Ans: C
Removing element from middle

Question: 6
An enqueue operation adds an element
(A) At any position in the queue
(B) To the front of the queue
(C) To the rear of the queue
(D) None of above
Ans: C
To the rear of the queue
Question: 7
Which of the following is not an entity?
(A) Book
(B) Student
(C) Employee
(D) Roll number
Ans: D
Roll number
Question: 8
What kind of list is best to answer many questions such as “what is the item at
position n?”
(A) Singly-linked lists
(B) Doubly-linked lists
(C) Lists implemented with an array
(D) Circular- linked lists
Ans: C
Lists implemented with an array
Question: 9
Which of following operations are generally not performed on report files?
(A) Updation
(B) Maintenance
(C) Retrieval
(D) All of above
Ans: D
All of above
Question: 10
When is insertion sort a good choice for sorting an array?
(A) The array has only a few elements out of place
(B) Each element of array requires a small amount of memory
(C) The processor speed is fast
(D) Each element of array requires a large amount of memory
Ans: A
The array has only a few elements out of place

Question: 1
Name the tree in which, for every node, the height of left sub tree and height of right
sub tree can differ by at most one
(A) AVL tree
(B) B-tree
(C) Threaded tree
(D) Complete tree
Ans: A
AVL tree
Question: 2
Which of the following statements about a binary tree is correct?
(A) No binary tree is both complete and full
(B) Every full binary tree is also a complete binary tree
(C) Every complete binary tree is also a full binary tree
(D) Every binary tree is either complete or full
Ans: B
Every full binary tree is also a complete binary tree
Question: 3
What is the worst-case time for binary search finding a single item in an array?
(A) Quadratic time
(B) Linear time
(C) Logarithmic time
(D) Constant time
Ans: C
Logarithmic time
Question: 4
If a binary tree satisfies shape and order property, it is known as
(A) Rooted tree
(B) Heap
(C) Sequential search tree
(D) Binary search tree
Ans: B
Heap
Question: 5
With an array-based stack, the algorithm for push is
(A) Increment top and add item to the new top location
(B) Add item to the top location and then increment top
(C) Return the top item and increment top
(D) Return the top item and decrement top
Ans: A
Increment top and add item to the new top location

Question: 1
What is the worst case time for quick sort to sort an array of n elements?
(A) 0(n)
(B) 0(nlog2n)
(C) 0(log2n)
(D) 0(log2n)
Ans: D
0(log2n)
Question: 2
The best way to find an item in an unsorted implemented using an array list is with
(A) Binary search
(B) Linear search
(C) Direct search
(D) Random search
Ans: B
Linear search
Question: 3
Which of the following data structure is used to represent a relationship between
pairs, where relationship is not hierarchical?
(A) Priority queue
(B) Heap
(C) Tree
(D) Graph
Ans: D
Graph
Question: 4
A data item that cannot be divided into sub items is known as
(A) Elementary data item
(B) Group data item
(C) Primary key
(D) Primary data item
Ans: B
Group data item
Question: 5
The best way to find an item in a sorted list implemented using an array is with ___
(A) Direct search
(B) Random search
(C) Binary search
(D) Linear search
Ans: C
Binary search

Question: 1
An index is a pair of elements comprising key and a file pointer or record number. A
file in which indices are is known as ____
(A) Index file
(B) Sort file
(C) Key file
(D) None of above
Ans: A
Index file
Question: 2
A data item that can be used to distinguish between two entities (records) is known
as
(A) Alternate key
(B) Primary key
(C) Primary data item
(D) Unique data item
Ans: B
Primary key
Question: 3
A data structure whose elements form a sequence is known as
(A) Heterogeneous data structure
(B) Homogeneous data structure
(C) Linear data structures
(D) Non- linear data structure
Ans: C
Linear data structures
Question: 4
Which of the following data structure is used to represent hierarchical relationship
among its elements?
(A) Queue
(B) Hash table
(C) Tree
(D) Graph
Ans: C
Tree
Question: 5
Which of the following statements about a binary tree is not correct?
(A) Every binary tree has at least one node
(B) Every non-empty tree has exactly one root node
(C) Every node has at most two children
(D) Every non-root node has exactly one parent
Ans: A
Every binary tree has at least one node
((MARKS)) 1
(1/2/3...)
((QUESTION From a group of 7 men and 6 women, five persons are to be
)) selected to form a committee so that at least 3 men are
there on the committee. In how many ways can it be done?
((OPTION_A) 564
)
((OPTION_B) 645
)
((OPTION_C) 735
)
((OPTION_D) 756
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
We may have (3 men and 2 women) or (4 men and 1 woman) or (5 men
((EXPLANAT only).
ION))
.. 7 6 7 6 7
(OPTIONAL) Required number of ways= ( C3 x C2) + ( C4 x C1) + ( C5)
7x6x5 6x5
= x + (7C3 x 6C1) + (7C2)
( (
3x2x1 2x1
= 525 +
7x6x5
3x2x1
) )[ J
x6 +
7x6
2x1
= (525 + 210 + 21)
= 756.
((MARKS)) 1
(1/2/3...)
((QUESTION)) How many 2 digits numbers can be formed from
the digits 0, 1, 2, 3, 4, 5 ?
((OPTION_A)) 5 x 6
((OPTION_B)) 52
((OPTION_C)) 62
((OPTION_D)) 50
((CORRECT_C A
HOICE))
(A/B/C/D)
((EXPLANATI To form two digit number, the first digit must be non-zero
ON)) and second may be any digit.
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION)) In how many ways 4 boys and 3 girls can be seated in
a row so that they are alternate.
((OPTION_A)) 144
((OPTION_B)) 288
((OPTION_C)) 12
((OPTION_D)) 256
((CORRECT_C A
HOICE))
(A/B/C/D)
((EXPLANATI Let the Arrangement be,
ON)) BGBGBGB
(OPTIONAL)
4 boys can be seated in 4! Ways.
Girl can be seated in 3! Ways.
Required number of ways,
= 4!*3! = 144.
((MARKS)) 2
(1/2/3...)
((QUESTION)) There are 30 people in a party. If everyone is to shake
hands with one another, how many hand shakes are
possible?
((OPTION_A)) 180
((OPTION_B)) 256
((OPTION_C)) 386
((OPTION_D)) 435
((CORRECT_C D
HOICE))
(A/B/C/D)
((EXPLANATI Total number of persons = n = 30
ON)) Shake hands involve only 2 persons = r = 2
(OPTIONAL) Number of shake hands = nCr = 30C2
30
C2 = (30 * 29) /(2 * 1) = 435
n
Cr = (n!) / r! (n – r)!
= 30! / 2! 28!
= 435
((MARKS)) 1
(1/2/3...)
((QUESTION)) A man positioned at the origin of the coordinate system.
The man can take steps of unit measure in the direction
North, East, West or South. Find the number of ways of
he can reach the point (5,6), covering the shortest
possible distance.
((OPTION_A)) 252
((OPTION_B)) 432
((OPTION_C)) 462
((OPTION_D)) 504
((CORRECT_C C
HOICE))
(A/B/C/D)
((EXPLANATI In order to reach (5,6) covering the shortest distance at the
ON)) same time the man has to make 5 horizontal and 6 vertical
(OPTIONAL) steps.
The number of ways in which these steps can be taken is
given by:
11! /(5! *6!) = 462
((MARKS)) 2
(1/2/3...)
((QUESTION)) a,b,c,d and e are five natural numbers. Find the number
of ordered sets (a,b,c,d,e) possible such that :
a + b + c + d + e =64
((OPTION_A)) 64
C5
((OPTION_B)) 68
C4
((OPTION_C)) 65
C4
((OPTION_D)) 63
C5
((CORRECT_C B
HOICE))
(A/B/C/D)
((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION In how many different ways can the letters of the
)) word 'LEADING' be arranged in such a way that the
vowels always come together?
((OPTION_A) 360
)
((OPTION_B) 480
)
((OPTION_C) 720
)
((OPTION_D) 5040
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
The word 'LEADING' has 7 different letters.
((EXPLANAT
ION)) When the vowels EAI are always together, they can be supposed to form one
(OPTIONAL) letter.
Then, we have to arrange the letters LNDG (EAI).

Now, 5 (4 + 1 = 5) letters can be arranged in 5! = 120 ways.

The vowels (EAI) can be arranged among themselves in 3! = 6 ways.

Required number of ways = (120 x 6) = 720.


((MARKS)) 1
(1/2/3...)
((QUESTION)) How many 6 digit telephone numbers can be formed if
each number starts with 35 and no digit appears more
than once?
((OPTION_A)) 720
((OPTION_B)) 360
((OPTION_C)) 1420
((OPTION_D)) 1680
((CORRECT_C D
HOICE))
(A/B/C/D)
((EXPLANATI The first two places can only be filled by 3 and 5
ON)) respectively and there is only 1 way for doing this.
(OPTIONAL) Given that no digit appears more than once. Hence we
have 8 digits remaining (0,1,2,4,6,7,8,9)
So, the next 4 places can be filled with the remaining 8
digits in 8P4 ways.
Total number of ways = 8P4 =8×7×6×5=1680
((MARKS)) 2
(1/2/3...)
((QUESTION In how many different ways can the letters of the word
)) 'CORPORATION' be arranged so that the vowels always
come together?
((OPTION_A) 810
)
((OPTION_B) 1440
)
((OPTION_C) 2880
)
((OPTION_D) 50400
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
In the word 'CORPORATION', we treat the vowels OOAIO as one letter.
((EXPLANAT
ION)) Thus, we have CRPRTN (OOAIO).
(OPTIONAL)
This has 7 (6 + 1) letters of which R occurs 2 times and the rest are different.

7!
Number of ways arranging these letters = = 2520.
2!

Now, 5 vowels in which O occurs 3 times and the rest are different, can be
arranged

5!
in = 20 ways.
3!

Required number of ways = (2520 x 20) = 50400.


((MARKS)) 1
(1/2/3...)
((QUESTION)) 25 buses are running between two places P and Q.
In how many ways can a person go from P to Q and
return by a different bus?
((OPTION_A)) None of these
((OPTION_B)) 600
((OPTION_C)) 576
((OPTION_D)) 625
((CORRECT_C B
HOICE))
(A/B/C/D)
((EXPLANATI He can go in any of the 25 buses (25 ways).
ON))
(OPTIONAL)
Since he cannot come back in the same bus, he can return
in 24 ways.

Total number of ways =25×24=600


((MARKS)) 2
(1/2/3...)
A question paper consists of 10 questions divided into two parts A and B.
((QUESTION)) Each part contains five questions. A candidate is required to attempt six
questions in all of which at least 2 should be from part A and at least 2
from part B. In how many ways can the candidate select the questions if
he can answer all questions equally well?
((OPTION_A)) 500
((OPTION_B)) 100
((OPTION_C)) 150
((OPTION_D)) 200
((CORRECT_C D
HOICE))
(A/B/C/D)
((EXPLANATI The candidate has to select six questions in all of which at least two
should be from Part A and two should be from Part B. He can select
ON))
questions in any of the following ways:
(OPTIONAL)
Choice Part A Part B
(i) 2 4
(ii) 3 3
(iii) 4 2

If the candidate follows choice (i), the number of ways in


which he can do so is:
5
C2×5C4=10×5=50
If the candidate follows choice (ii), the number of ways in
which he can do so is:
5
C3×5C3=10×10=100
Similarly, if the candidate follows choice (iii), then the
number of ways in which he can do so is:
5
C4×5C2=5×10=50
Therefore, the candidate can select the question in
50+100+50 = 200 ways.
((MARKS)) 2
(1/2/3...)
((QUESTION Out of 7 consonants and 4 vowels, how many words of 3
)) consonants and 2 vowels can be formed?
((OPTION_A) 210
)
((OPTION_B) 1050
)
((OPTION_C) 25200
)
((OPTION_D) 21400
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
Number of ways of selecting (3 consonants out of 7) and (2 vowels out of 4)
((EXPLANAT
ION)) = (7C3 x 4C2)
(OPTIONAL) 7x6x5 4x3
=( x
3x2x1 2x1 J
= 210.

Number of groups, each having 3 consonants and 2 vowels = 210.

Each group contains 5 letters.

Number of ways of arranging


= 5!
5 letters among themselves
=5x4x3x2x1
= 120.

.. Required number of ways = (210 x 120) = 25200.


((MARKS)) 1
(1/2/3...)
((QUESTION In how many ways can the letters of the word
)) 'LEADER' be arranged?
((OPTION_A) 720
)
((OPTION_B) 360
)
((OPTION_C) 144
)
((OPTION_D) 72
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
The word 'LEADER' contains 6 letters, namely 1L, 2E, 1A, 1D and 1R.
((EXPLANAT
ION)) Required number of ways =
6!
= 360.
(OPTIONAL) (1!)(2!)(1!)(1!)(1!)
((MARKS)) 1
(1/2/3...)
((QUESTION How many 3-digit numbers can be formed from the digits
)) 2, 3, 5, 6, 7 and 9, which are divisible by 5 and
none of the digits is repeated?
((OPTION_A) 5
)
((OPTION_B) 10
)
((OPTION_C) 15
)
((OPTION_D) 20
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
Since each desired number is divisible by 5, so we must have 5 at the unit
((EXPLANAT place. So, there is 1 way of doing it.
ION))
(OPTIONAL) The tens place can now be filled by any of the remaining 5 digits (2, 3, 6, 7,
9). So, there are 5 ways of filling the tens place.

The hundreds place can now be filled by any of the remaining 4 digits. So,
there are 4 ways of filling it.

Required number of numbers = (1 x 5 x 4) = 20.


((MARKS)) 1
(1/2/3...)
((QUESTION In how many ways a committee, consisting of 5 men and 6
)) women can be formed from 8 men and 10 women?
((OPTION_A) 266
)
((OPTION_B) 5040
)
((OPTION_C) 11760
)
((OPTION_D) 86400
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
Required number of ways= (8C5 x 10C6)
((EXPLANAT = (8C3 x 10C4)
ION)) 8 x 7 x 6 10 x 9 x 8 x 7
(OPTIONAL) ( x
= 3x2x1 4x3x2x1 J
= 11760.
((MARKS)) 1
(1/2/3...)
((QUESTION A box contains 2 white balls, 3 black balls and 4
)) red balls. In how many ways can 3 balls be drawn
from the box, if at least one black ball is to be
included in the draw?
((OPTION_A) 64
)
((OPTION_B) 48
)
((OPTION_C) 32
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
We may have(1 black and 2 non-black) or (2 black and 1 non-black) or (3
((EXPLANAT black).
ION))
.. 3 6 3 6 3
(OPTIONAL) Required number of ways= ( C1 x C2) + ( C2 x C1) + ( C3)
(
= 3x
6x5
2x1 )(+
= (45 + 18 + 1)
3x2
2x1 )
x6 +1

= 64.
((MARKS)) 1
(1/2/3...)
((QUESTION In how many ways can 8 Indians and, 4 American and 4
)) Englishmen can be seated in a row so that all person
of the same nationality sit together?
((OPTION_A) 3! 4! 8! 4!
)
((OPTION_B) 3! 8!
)
((OPTION_C) 4! 4!
)
((OPTION_D) 8! 4! 4!
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION In how many ways can 10 examination papers be arranged
)) so that the best and the worst papers never come together?
((OPTION_A) 8*9!
)
((OPTION_B) 8*8!
)
((OPTION_C) 7*9!
)
((OPTION_D) 9*8!
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 2
(1/2/3...)
((QUESTION In the next World cup of cricket there will be 12 teams,
)) divided equally in two groups. Teams of each group will
play a match against each other. From each group 3 top
teams will qualify for the next round. In this round each
team will play against each others once. Four top teams
of this round will qualify for the semifinal round, where
they play the best of three matches. The Minimum number
of matches in the next World cup will be:
((OPTION_A) 54
)
((OPTION_B) 53
)
((OPTION_C) 38
)
((OPTION_D) 43
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION A letter lock consists of 4 rings, each ring contains 9
)) non-zero digits. This lock can be opened by setting four
digit code with the proper combination of each of the 4
rings. Maximum how many codes can be formed to open the

((OPTION_A) 4
9

)
((OPTION_B) 94
)
((OPTION_C) P4
9

)
((OPTION_D) None
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION If 5* nP3 = 4* (n+1)P3, find n?
))
((OPTION_A) 10
)
((OPTION_B) 11
)
((OPTION_C) 12
)
((OPTION_D) 14
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION Ten different letters of alphabet are given, words
)) with 5 letters are formed from these given letters.
Then, the number of words which have at least one
letter repeated is:
((OPTION_A) 69760
)
((OPTION_B) 30240
)
((OPTION_C) 99748
)
((OPTION_D) 42386
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT Number of words which have at least one letter replaced,
= Total number of words - total number of words in which no letter is repeated.
ION)) => 105 – 10P5.
(OPTIONAL) => 100000 − 30240 = 69760.

((MARKS)) 2
(1/2/3...)
((QUESTION 12 chairs are arranged in a row and are numbered 1 to 12.
))
4 men have to be seated in these chairs so that the chairs
numbered 1 to 8 should be occupied and no two men
occupy adjacent chairs. Find the number of ways the
task can be done.
((OPTION_A) 384
)
((OPTION_B) 390
)
((OPTION_C) 432
)
((OPTION_D) 470
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT Given there are 12 numbered chairs, such that chairs numbered 1 to 8 should be
occupied.
ION)) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12.
(OPTIONAL) The various combinations of chairs that ensure that no two men are sitting
together are listed.
(1, 3, 5,__), The fourth chair can be 5,6,10,11 or 12, hence 5 ways.
(1, 4, 8, __), The fourth chair can be 6,10,11 or 12 hence 4 ways.
(1, 5, 8, __), the fourth chair can be 10,11 or 12 hence 3 ways.
(1, 6, 8,__), the fourth chair can be 10,11 or 12 hence 3 ways.
(1,8,10,12) is also one of the combinations.
Hence, 16 such combinations exist.
In case of each these combinations we can make the four men inter arrange in 4!
ways.
Hence, the required result =16�4!= 384.

((MARKS)) 1
(1/2/3...)
((QUESTION What is the probability of drawing 2 kings from a deck
)) (one after another )
((OPTION_A) 0.5%
)
((OPTION_B) 0.4%
)
((OPTION_C) 10%
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION 70% of your friends like chocolate, 35% like chocolate and
)) Strawberry. What % of those who like chocolate also like
Strawberry.
((OPTION_A) 35%
)
((OPTION_B) 50%
)
((OPTION_C) 70%
)
((OPTION_D) 100%
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION You want to be goalkeeper in football final match. It
)) Depends on who is coach that day. With coach Sam
Probability of being Goalkeeper is 0.5. With coach
Alex probability of being Goalkeeper is 0.3. Sam is coach
For 60% time. So what is the probability you being
Goalkeeper for final match?
((OPTION_A) 40%
)
((OPTION_B) 50%
)
((OPTION_C) 60%
)
((OPTION_D) None
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION 5 different books are issued to 5 students (1 for each).
)) Suppose books were returned and again distributed so that
No student can take same book twice, in how many ways
It can be done?
((OPTION_A) 5280
)
((OPTION_B) 6000
)
((OPTION_C) 7000
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION How many different salads can be made from 5 different
)) Fruits, when only one fruit can also be used in a salad.
((OPTION_A) 32
)
((OPTION_B) 31
)
((OPTION_C) 5!
)
((OPTION_D) None
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION How many 4 digit even numbers have all 4 digits distinct?
))
((OPTION_A) 2200
)
((OPTION_B) 504
)
((OPTION_C) 1792
)
((OPTION_D) 2296
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION How many binary sequences are there with length 15 with
)) Exactly 6 ones.
((OPTION_A) 5000
)
((OPTION_B) 15P6
)
((OPTION_C) 5005
)
((OPTION_D) None
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION 4 coins are tossed. Find probability of getting 2 heads and
)) 2 tails.
((OPTION_A) 3/16
)
((OPTION_B) 6/8
)
((OPTION_C) 3/8
)
((OPTION_D) None
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION What will be the coefficient of p11q12 in the expansion of
)) (p+q)23
((OPTION_A) 23!/(11!12!)
)
((OPTION_B) 23!
)
((OPTION_C) 23!/(11!)
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION What will be the coefficient of p5q6 in the expansion of
)) (3p-2q)11
((OPTION_A) 7185024
)
((OPTION_B) 5!*6!
)
((OPTION_C) 1352078
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION nC1+2. nC2+…+n. nCn=?
))
((OPTION_A) n.2n
)
((OPTION_B) n.2n-1
)
((OPTION_C) 2n
)
((OPTION_D) None
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION nC1 - 2. nC2+…+(-1)n-1n. nCn=?
))
((OPTION_A) n
)
((OPTION_B) 1
)
((OPTION_C) 2
)
((OPTION_D) 0
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION Find the term independent of x in the expansion of
)) (x2+1/x3)5
((OPTION_A) 8
)
((OPTION_B) 9
)
((OPTION_C) 10
)
((OPTION_D) None
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION 17n-128n2+112n leaves remainder x when divided by y.
)) What is x and y?
((OPTION_A) x=12, y = 16
)
((OPTION_B) x=1, y = 16
)
((OPTION_C) x=10, y = 162
)
((OPTION_D) x=1, y = 163
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION For any natural number n, 21n-2n-19n*2n-1 is multiple of?
))
((OPTION_A) 359
)
((OPTION_B) 360
)
((OPTION_C) 361
)
((OPTION_D) 362
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION 25100+2599 is divisible by?
))
((OPTION_A) 674
)
((OPTION_B) 675
)
((OPTION_C) 676
)
((OPTION_D) None
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION Of the students in a college, it is known that 60% reside in
)) Hostel and 40% are day scholars (not residing in hostel).
Previous year results report that 30% of all students who
reside in hostel attain A grade and 20% of day scholars
attain A grade in their annual examination. At the end of
the year, one student is chosen at random from the college
and he has an A grade, what is the probability that the
student is a hostlier?

((OPTION_A) 9/13
)
((OPTION_B) 4/13
)
((OPTION_C) 2/13
)
((OPTION_D) 6/13
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT • Given E1,E2,E3.....EnE1,E2,E3.....En are mutually exclusive and exhaustive events, we can find the conditional

ION)) probability P(Ei|A)P(Ei|A) for any event A associated w/ EiEi using the Bayes theorem as

(OPTIONAL) follows: P(Ei/A)P(Ei/A)=P(Ei)P(A/Ei)∑ni=1P(Ei)P(A/Ei)P(Ei)P(A/Ei)∑i=1nP(Ei)P(A/Ei)

Let E1E1: students residing in the hostel →→ P(E1E1) = 60% = 60100=3560100=35

Let E2E2: day scholars →→ P(E2E2) = 40% = 40100=2540100=25

30% of hostel students get an A grade →→ P (E|E1E1) = 30% = 30100=31030100=310

20% of day scholars get an A grade →→ P (E|E2E2) = 20% = 20100=1520100=15

We need to find the probability that a student who is chosen from random that has an A grade is from the hostel.

We can use Baye's theorem, according to

which P(E1|A)=P(E1)(P(A|E1)P(E1)P(A|E1)+P(E2)+P(A|E2)P(E1|A)=P(E1)(P(A|E1)P(E1)P(A|E1)+P(E2)+P(A|E2)

Using Baye's theorem, P (E1E1|A) =35.31035.310+25.1535.31035.310+25.15 = 99+4=913

((MARKS)) 1
(1/2/3...)
((QUESTION In Bayes theorem, what is the meant by P(Hi|E)?
))
((OPTION_A) The probability that hypotheses Hi is true given evidence E
)
((OPTION_B) The probability that hypotheses Hi is false given evidence E
)
((OPTION_C) The probability that hypotheses Hi is true given false
) evidence E
((OPTION_D) The probability that hypotheses Hi is false given false
) evidence E
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION In answering a question on a multiple choice test,
)) a student either knows the answer or guesses. Let
3/4 be the probability that he knows the answer
and 1/4 be the probability that he guesses.
Assuming that a student who guesses at the answer
will be correct with probability 1/4 . What is
the probability that the student knows the answer
given that he answered it correctly?
((OPTION_A) 1/13
)
((OPTION_B) 12/13
)
((OPTION_C) 6/13
)
((OPTION_D) 8/13
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION A factory has two machines A and B. Past record shows
)) that machine A produced 60% of the items of output
and machine B produced 40% of the items. Further,
2% of the items produced by machine A and 1%
produced by machine B were defective. All the items
are put into one stockpile and then one item is chosen
at random from this and is found to be defective.
What is the probability that it was produced by
machine B?
((OPTION_A) ½
)
((OPTION_B) 1/3
)
((OPTION_C) ¼
)
((OPTION_D) 1/5
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION There are three coins. One is a two headed coin
)) (having head on both faces), another is a biased
coin that comes up heads 75% of the time and third
is an unbiased coin. One of the three coins is chosen
at random and tossed, it shows heads, what is the
probability that it was the two headed coin ?

((OPTION_A) ½
)
((OPTION_B) 3/5
)
((OPTION_C) 2/6
)
((OPTION_D) 4/9
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION A bag contains 4 red and 4 black balls, another
)) bag contains 2 red and 6 black balls. One of the two
bags is selected at random and a ball is drawn from
the bag which is found to be red. Find the probability
that the ball is drawn from the first bag.

((OPTION_A) 1/3
)
((OPTION_B) 2/3
)
((OPTION_C) ¼
)
((OPTION_D) 3/7
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The bit strings for the sets are 1111100000 and
1010101010. The union of these sets is ____________.

((OPTION_A)) 1010100000

((OPTION_B)) 1010101101

((OPTION_C)) 1111111100

((OPTION_D)) 1111101010

((CORRECT_C D
HOICE))
(A/B/C/D)

((EXPLANATI The bit string for the union is the bitwise OR of the bit strings
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The set difference of the set A with null set


is ________.

((OPTION_A)) A

((OPTION_B)) Null

((OPTION_C)) U

((OPTION_D)) B

((CORRECT_C A
HOICE))
(A/B/C/D)

((EXPLANATI The set difference of the set A by null set denoted by A – {null} is A.
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The complement of the set A is _____________.

((OPTION_A)) A– B

((OPTION_B)) U –A

((OPTION_C)) A– U

((OPTION_D)) B –A

((CORRECT_C B
HOICE))
(A/B/C/D)

((EXPLANATI The complement of the set A is the complement of A with respect to U


ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The difference of {1, 2, 3} and {1, 2, 5} is the set _________.

((OPTION_A)) {1}

((OPTION_B)) {5}

((OPTION_C)) {3}

((OPTION_D)) {2}

((CORRECT_C C
HOICE))
(A/B/C/D)

((EXPLANATI The difference of the sets A and B denoted by A-B, is the set containing
ON)) those elements that are in A not in B.
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) Which of the following two sets are disjoint?

((OPTION_A)) {1, 3, 5} and {1, 3, 6}

((OPTION_B)) {1, 2, 3} and {1, 2, 3}

((OPTION_C)) {1, 3, 5} and {2, 3, 4}

((OPTION_D)) {1, 3, 5} and {2, 4, 6}

((CORRECT_C D
HOICE))
(A/B/C/D)

((EXPLANATI Two sets are disjoint if the intersection of two sets is the empty set.
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) Two sets are called disjoint if there _____________ is the


empty set

((OPTION_A)) Union

((OPTION_B)) Difference

((OPTION_C)) Intersection

((OPTION_D)) Complement

((CORRECT_C C
HOICE))
(A/B/C/D)

((EXPLANATI By the definition of the disjoint set.


ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The members of the set S = {x | x is the square of an


integer and x < 100} is _________________.

((OPTION_A)) {0, 2, 4, 5, 9, 58, 49, 56, 99, 12}

((OPTION_B)) {0, 1, 4, 9, 16, 25, 36, 49, 64, 81}

((OPTION_C)) {1, 4, 9, 16, 25, 36, 64, 81, 85, 99}

((OPTION_D)) {0, 1, 4, 9, 16, 25, 36, 49, 64, 121}

((CORRECT_C B
HOICE))
(A/B/C/D)

((EXPLANATI The set S consists of the square of an integer less than 10


ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) What is the Cardinality of the Power set of the set {0, 1, 2}.

((OPTION_A)) 8

((OPTION_B)) 7

((OPTION_C)) 6

((OPTION_D)) 9

((CORRECT_C A
HOICE))
(A/B/C/D)

((EXPLANATI Power set P ({0, 1, 2}) is the set of all subsets of {0, 1, 2}. Hence
ON)) P({0, 1, 2}) = {null , {0}, {1}, {2}, {0, 1}, {0,2}, {1, 2}, {0, 1, 2}}.
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The set of positive integers is _________

((OPTION_A)) Infinite

((OPTION_B)) Finite

((OPTION_C)) Subset

((OPTION_D)) Empty

((CORRECT_C A
HOICE))
(A/B/C/D)

((EXPLANATI The set of positive integers is not finite.


ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) Which of the following statement is true

((OPTION_A)) The power set of any set is always a non empty set

((OPTION_B)) The power set of a set can be a null set

((OPTION_C)) The power set of an empty set is empty

((OPTION_D)) The power set may have odd number of elements in it

((CORRECT_C A
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 2
(1/2/3...)

((QUESTION)) In a class of 25 students, if 10 students have play guitar and 15 students play
mandolin, and 3 students can’t play any one of them. Then how many
students can play only guitar.

((OPTION_A)) 10

((OPTION_B)) 15

((OPTION_C)) 3

((OPTION_D)) 7

((CORRECT_C D
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 2
(1/2/3...)

((QUESTION)) If A represents a set of students knowing Marathi and B represents students


knowing Hindi, then the number of students knowing only Marathi is given
by

((OPTION_A)) |AUB|-|B|+|A∩B|

((OPTION_B)) |AUB|-|B||

((OPTION_C)) |A-B|

((OPTION_D)) Both A and B

((CORRECT_C D
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 2
(1/2/3...)

((QUESTION)) (p->q)->p is equal to

((OPTION_A)) p->q

((OPTION_B)) p

((OPTION_C)) q

((OPTION_D)) ~q

((CORRECT_C D
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 2
(1/2/3...)

((QUESTION)) (p->q)->q is equal to

((OPTION_A)) p

((OPTION_B)) q

((OPTION_C)) pVq

((OPTION_D)) ~(~pV~q)

((CORRECT_C C
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) Which of the following statement is false

((OPTION_A)) An uncountable is always infinite

((OPTION_B)) An infinite set is always uncountable

((OPTION_C)) A finite set is always countable

((OPTION_D)) Set of natural numbers is countable

((CORRECT_C B
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) Mathematical induction is used to

((OPTION_A)) Solve mathematical series problems

((OPTION_B)) Solve complex formulae

((OPTION_C)) Prove the formulae

((OPTION_D)) Derive the formulae

((CORRECT_C C
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The cardinality of a set indicates

((OPTION_A)) The elements present in the set

((OPTION_B)) The type of elements present in the set

((OPTION_C)) The number of elements present in the set

((OPTION_D)) The name of the set

((CORRECT_C C
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The power set of a set A is represented as

((OPTION_A)) P(A)

((OPTION_B)) 2P

((OPTION_C)) Both A and B

((OPTION_D)) Ø

((CORRECT_C C
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The truth value of tautology is always

((OPTION_A)) True

((OPTION_B)) False

((OPTION_C)) Depends on the proposition

((OPTION_D)) Null

((CORRECT_C A
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The truth value of contradiction is always

((OPTION_A)) True

((OPTION_B)) False

((OPTION_C)) Depends on the proposition

((OPTION_D)) Null

((CORRECT_C B
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 2
(1/2/3...)

((QUESTION)) Given that the value of p->q is false what is the value of (~pV~q)->q

((OPTION_A)) False

((OPTION_B)) True

((OPTION_C)) pVq

((OPTION_D)) None of the above

((CORRECT_C A
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
Id 1
Question Which of these sets is finite?
A {x | x is even}
B {1, 2, 3,...}
C {1, 2, 3,...,999,1000}
D None of above
Answer C
Id 2
Question Which of these sets is not a null set if x is integer?
A A = {x | 6x = 24 and 3x = 1}
B B = {x | x + 10 = 10}
C C = {x | x is a man older than 200 years}
D D = {x | x < x}
Answer B

Id 3
Question The number of elements in the power set P(S) of the set S={{Ф},1,{1,2,3} is
A 2
B 4
C 8
D 10
Answer C

Id 4
Question A theory of sets was firstly introduced by….
A Tim berners lee
B Franklin
C Canter
D Panther
Answer C

Id 5
Question In the figure opposite, U = { a,
b, c, d, e, f, g, h }. (X∩Y) U Z
=?
u

A {c,e,f,g,h}
B {e,f,g}
C {f}
D {c,f,h}
Answer A

Id 6
Question Which of the following diagrams indicates the best relation between Hospital, Nurse
and Patient ?
A

@
B

~
C
@
D

@o
Answer C

Id 7
Question In the figure below, the shaded portion represents?

X _____,..__ u

A (X∩ Z) U Y
B (X ∩ Y) U Z
C (Z ∩ Y) U X
D (Y∩ Z) U X
Answer B

Id 8
Question In the figure below, the shaded portion represents?

A (AUC) ∩ B
B (BUA)∩ C
C ~(A U C)
D ~(A) U ~(C)
Answer C

Id 9
Question What is shaded in the Venn diagram below?.
A AUB
B ~(A)
C A­B
D B­A
Answer C

Id 10
Question Some girls play netball and Some girls are tall in class.
Tall girls are over 1.8 meters in height. All netball players are tall girls.
Lee is 1.9 meters tall and does not play netball.
Which Venn diagram below represents the statements above?
U= Girls P= Plays Netball D= Does Not Play T= Tall Girls

u
B
0i!e
u
C

l®lu
D

l®lu
Answer B
Id 11
Question Which of the following diagrams indicates the best relation between India, Hariyana
and World ?

@o
B
00
0
C

@
D

@)
Answer D

Id 12
Question Which of the following proposition is a tautology?
A (p v q)→p
B p v (q→p)
C p v (p→q)
D p→(p→q)
Answer C

Id 13
Question Set A has 3 elements, set B has 6 elements, then the minimum number of elements in
A U B is
A 6
B 9
C 18
D None of above
Answer B

Id 14
Question Consider the statement,“If n is divisible by 30 then n is divisible by 2 and by 3 and
by 5.”Which of the following statements is equivalent to this statement?
A If n is not divisible by 30 then n is divisible by 2 or divisible by 3 or divisible by 5
B If n is not divisible by 30 then n is not divisible by 2 or not divisible by 3 or not divisible
by 5
C If n is divisible by 2 and divisible by 3 and divisible by 5 then n is divisible by 30.
D If n is not divisible by 2 or not divisible by 3 or not divisible by 5 then n is not divisible
by 30
Answer D

Id 15
Question Suppose N={1,2,3……}is the universal set &
A={x:x<=6},B={x:4<=x<=9},C={1,3,5,7,9},D={2,3,5,7,9}
find (C ∩Β) ∪ (Α∩D)
A {1,3,4,6,8}
B {2,3,5,7,9}
C {2,3,4,6}
D {1,2,3,7}
Answer B

Id 16
Question If two sets A and B have no common elements then such sets are known as?
A Intersection
B Union
C Disjoint
D Complement
Answer C

Id 17
Question The contrapositive of p →q is
A q →p
B ¬p →¬q
C ¬q →¬p
D p →¬q
Answer C
Id 18
Question The Converse of p →q is
A q →p
B ¬p → ¬q
C ¬q → ¬p
D p → ¬q
Answer A

Id 19
Question The Inverse of p →q is
A q →p
B ¬p → ¬q
C ¬q → ¬p
D p → ¬q
Answer B

Id 20
Question p ↔ q is logically equivalent to

A (p → q) Λ (q → p)
B ¬q → ¬p

C ¬q
D ¬p
Answer A

Id 21
Question p ↔ q is logically equivalent to
A (p Λ q) V (¬p Λ ¬q)
B ¬p → ¬q
C ¬p V q
D ¬q
Answer A

Id 22
Question p↔q Ξ

A ¬p ↔ ¬q
B ¬p ↔ q
C p ↔ ¬q
D q↔p
Answer A

Id 23
Question ¬ (p → q) Ξ

A ¬p V q
B p ¬q
C p Λ ¬q
D ¬p Λ q
Answer C

Id 24
Question Which of the following is Tautology
A p → (p q )
B (p Λ q) → q
C p Λ ¬q(p Λ q) V (¬p Λ ¬q)
D Both (a) and (b)
Answer D

Id 25
Question (p Λ q) → (p → q) is
A Contradiction
B Tautology
C Contingency
D Well form formula.
Answer B

Id 26
Question ¬ (p V (¬p Λ q)) is logically equivalent to
A ¬p Λ q
B ¬p Λ ¬q
C ¬p V ¬q
D p Λ ¬q
Answer B

Id 27
Question A compound proposition obtained from another compound proposition containing Λ V or
¬ operators, by replacing Λ with V, V with Λ each ¬ by F and each F by T is
A Disjunctive normal form
B Conjunctive normal form
C Dual
D Principal Disjunctive normal form
Answer C

Id 28
Question "P (x) for all values of x in the domain" denotes
A existential quantification
B universal quantification
C counter quantification
D none of these
Answer B

Id 29
Question "There exists an element x in the domain such that P (x)" denotes.
A existential quantification
B universal quantification
C counter quantification
D none of these
Answer A

Id 30
Question The quantifiers ∀ and ∃ have ………… precedence than all the logical operators from
propositional calculus.
A lower
B equal
C high
D can't say
Answer C

Id 31
Question ¬∀ x P (x) is logically equivalent to
A ∀ x ¬ P (x)
B ∃ x ¬ P (x)
C ∀ x ¬ P(x)
D ¬ ∃ x P (x)
Answer B

Id 32
Question ¬∃ x p (x) is logically equivalent to
A ∀ x ¬ P (x)
B ∃ x ¬ P (x)
C ∀ x ¬ P (x)
D ¬ ∃ x P (x)
Answer C

Id 33
Question ¬∀ x (P (x) → Q (x)) is logically equivalent to
A ∀ x ¬ (P (x) Λ Q (x))
B ∃ x ¬ (P (x) Λ Q (x))
C ∀ x (P (x) Λ Q (x))
D ∃ x P (x) Λ ¬Q (x)
Answer D

Id 34
Question Let P (x) denote x is even over the universe of integers. Then symbolic representation of
“At least one integer is even” is
A ∃ x P (x)
B ∀ x P (x)
C ¬ ∃ x P (x)
D ∃ x ¬ P (x)
Answer A

Id 35
Question Let C(x) denote x is comedian. F(x) x is funny. Then statement "All comedians are funny”
is
A ∀ x (C (x) → F (x))
B ∀ x (C (x) Λ F (x))
C ∃ x (C (x) → F (x))
D ∃ x (C (x) Λ F (x))
Answer A

Id 36
Question Let C(x) denote x is comedian. F(x) x is funny. Then statement "Every person is funny
comedian"
A ∀ x (C (x) → F (x))
B ∀ x (C (x) Λ F (x))
C ∃ x (C (x) → F (x))
D ∃ x (C (x) Λ F (x))
Answer B

Id 37
Question Let C(x) denote x is comedian. F(x) x is funny. Then statement “There exists a person if
he or she is comedian, then he or she is funny” is
A ∀ x (C (x) → F (x))
B ∀ x (C (x) Λ F (x))
C ∃ x (C (x) → F (x))
D ∃ x (C (x) Λ F (x))
Answer C

Id 38
Question Let C(x) denote x is comedian. F(x) x is funny. Then statement “Some comedians are
funny” is
A ∀ x (C (x) → F (x))
B ∀ x (C (x) Λ F (x))
C ∃ x (C (x) → F (x))
D ∃ x (C (x) Λ F (x))
Answer D

Id 39
Question Let P (x) denote x spends more than six hours every weekday in class. Then the statement
" There is a student who spends more than six hours everyday in class." is
A ∃ x P (x)
B ∀ x P (x)
C ∃ x ¬P (x)
D ∀ x ¬ P (x)
Answer A

Id 40
Question Let P (x) denote x spends more than six hours every weekday in class. Then the statement
“Every student spends more than six hours every weekday in class “ is
A ∃ x P (x)
B ∀ x P (x)
C ∃ x ¬P (x)
D ∀ x ¬ P (x)
Answer B

Id 41
Question Let P (x) denote x spends more than six hours every weekday in class. Then the statement
“There is a student who does not spend more than six hours every weekday in class “ is
A ∃ x P (x)
B ∀ x P (x)
C ∃ x ¬P (x)
D ∀ x ¬ P (x)
Answer C

Id 42
Question Let P (x) denote x spends more than six hours every weekday in class. Then the statement
“No student spends more than 6 hours every weekday in class” is
A ∃ x P (x)
B ∀ x P (x)
C ∃ x ¬P (x)
D ∀ x ¬ P (x)
Answer D

Id 43
Question Let P (x) : x can speak Hindi
Q (x) : x knowns computer language C++
Represent the statement : There is a student at your school who speaks Hindi and
knows C++
A ∃ x (P (x) Λ Q (x))
B ∃ x (P (x) Λ ¬Q (x))
C ∀ x (P (x) V Q (x))
D ∀ x ¬ (P (x) V Q (x))
Answer A

Id 44
Question Let P (x) : x can speak Hindi Q (x) : x knowns computer language C++.
Represent the statement :There is student at your school who speaks Hindi but does not
knows C++
A ∃ x (P (x) Λ Q (x))
B ∃ x (P (x) Λ ¬Q (x))
C ∀ x (P (x) V Q (x))
D ∀ x ¬ (P (x) V Q (x))
Answer B

Id 45
Question Let P (x) : x can speak Hindi. Q (x) : x knowns computer language C++.
Represent the statement :Every student at your school can speak Hindi or knows C++
A ∃ x (P (x) Λ Q (x))
B ∃ x (P (x) Λ ¬Q (x))
C ∀ x (P (x) V Q (x))
D ∀ x ¬ (P (x) V Q (x))
Answer C

Id 46
Question Let P (x) : x can speak Hindi. Q (x) : x knowns computer language C++.
Represent the statement :No student at your school speak Hindi or knows C++
A ∃ x (P (x) Λ Q (x))
B ∃ x (P (x) Λ ¬Q (x))
C ∀ x (P (x) V Q (x))
D ∀ x ¬ (P (x) V Q (x))
Answer D

Id 47
Question Let P (x) : x is perfect. F (x) : x is your friend. Translate the statement into logical
expression using predicates, quantifiers and logical connectives "No one is perfect"
A ∀ x ¬ P (x)
B ¬ ∀ x P (x)
C ∀ x (F (x) → P (x))
D ∃ x (F (x) Λ P (x))
Answer A

Id 48
Question Let P (x) : x is perfect. F (x) : x is your friend. Translate the statement into logical
expression using predicates, quantifiers and logical connectives “Not everyone is perfect”
A ∀ x ¬ P (x)
B ¬ ∀ x P (x)
C ∀ x (F (x) → P (x))
D ∃ x (F (x) Λ P (x))
Answer B

Id 49
Question Let P (x) : x is perfect. F (x) : x is your friend. Translate the statement into logical
expression using predicates, quantifiers and logical connectives “Atleast one of your
friend is perfect”
A ∀ x ¬ P (x)
B ¬ ∀ x P (x)
C ∀ x (F (x) → P (x))
D ∃ x (F (x) Λ P (x))
Answer D

Id 50
Question If P = { a, b, { a, b}, { { a, b}} which of the following statement is false
A { a, b} ∈ P
B { b, { a, b}} ⊆ P
C { a, {b} } ⊆ P
D { a, b } ⊆ P
Answer C

Id 51
Question Let P (x) : x is perfect. F (x) : x is your friend. Translate the statement into logical
expression using predicates, quantifiers and logical connectives “everyone is your friend
and is perfect”
A ∀ x (F (x) → P (x))
B ∀ x (F (x) Λ P (x))
C ∀ x (F (x) V P (x))
D (¬ ∀ x F (x) V ∃ x ¬P (x))
Answer B

Id 52
Question Let P (x) : x is perfect. F (x) : x is your friend. Translate the statement into logical
expression using predicates, quantifiers and logical connectives “Not everybody is your
friend or someone is not perfect.”
A ∀ x (F (x) → P (x))
B ∀ x (F (x) Λ P(x))
C ∀ x (F (x) V P (x))
D (¬ ∀ x F (x) V ∃ x ¬P (x))
Answer D

Id 53
Question A formula equivalent to given formula and consists of sum of elementary products is
called ?
A Conjunctive Normal form
B Disjunctive Normal form
C Principle Disjunctive Normal form
D Principle Conjunctive Normal form
Answer B

Id 54
Question A formula equivalent to given formula and consists of product of elementary sums is
called
A Conjunctive Normal form
B Disjunctive Normal form
C Principle Disjunctive Normal form
D Principle Conjunctive Normal form
Answer A

Id 55
Question For a formula, an equivalent formula consisting of conjunctions of maxterms only is
called
A Conjunctive Normal form
B Disjunctive Normal form
C Principle Disjunctive Normal form
D Principle Conjunctive Normal form
Answer D

Id 56
Question For a formula, an equivalent formula consisting of disjunctions of minterms only is called
A Conjunctive Normal form
B Disjunctive Normal form
C Principle Disjunctive Normal form
D Principle Conjunctive Normal form
Answer C

Id 57
Question The set of natural numbers N is
A { – ∞ , …… – 3, – 2, – 1, 0, 1, 2, ……… ∞}
B {0, 1, 2, 3, ………, ∞ }
C {– ∞, ………, – 3, – 2, – 1}
D {1, 2, 3, …………, ∞}
Answer B

Id 58
Question The set of integers Z is
A { – ∞ , …… – 3, – 2, – 1, 0, 1, 2, ……… ∞}
B {0, 1, 2, 3, ………, ∞ }
C {– ∞, ………, – 3, – 2, – 1}
D (1, 2, 3, …………, ∞}
Answer A

Id 59
Question If and only if ∀ x (x ∈ A ↔ x ∈ B) means
A Set A and B are equal
B Set A and B are disjoint
C Set A is greater than B
D Set B is greater than A
Answer A

Id 60
Question A set of all the subsets of a set is
A subset
B proper subset
C power set
D proper set
Answer C

Id 61
Question A = { a, b, { a, c} , Φ} than A - { b, c} is
A { {a, c} }
B { b, { a, c}, Φ}
C { a, { a, c}, Φ}
D Φ
Answer C

Id 62
Question If B = { Φ, c} than B ∩ P (B) is
A Φ
B c
C P (B)
D {Φ}
Answer D

Id 63
Question If A = { 1, 2, 4, 6, 8} , B = { 2, 4, 5, 9} then A ⊕ B
A {1, 4, 5, 6, 8}
B {1, 5, 6, 8, 9}
C {1, 2, 5, 8, 9}
D {1, 6, 8, 9}
Answer B

Id 64
Question If C is set containing 5 distinct elements then the cardinality of power set of A.
A 32
B 16
C 64
D 128
Answer A

Id 65
Question The set (A –B) – C is equal to the set
A (A –B) ∩ C
B (A ∪ B) – C
C (A – B) ∪ C
D A –(B ∪ C)
Answer D

Id 66
Question A survey of 100 college faculty who exercise regularly found that 45 jog, 30 swim, 20
cycle, 6 jog and swim. 1 jogs and cycles, 5 swim and cycle, and 1 does all three. How
many of the faculty members do not do any of these three activities?
A 12
B 11
C 7
D 16
Answer D
Id 67
Question A survey of 100 college faculty who exercise regularly found that 45 jog, 30 swim, 20
cycle, 6 jog and swim. 1 jogs and cycles, 5 swim and cycle, and 1 does all three. How
many of the faculty members just jog?
A 38
B 39
C 40
D 33
Answer B

Id 68
Question A survey of 100 college faculty who exercise regularly found that 45 jog, 30 swim, 20
cycle, 6 jog and swim. 1 jogs and cycles, 5 swim and cycle, and 1 does all three. How
many of the faculty members just swim?
A 19
B 25
C 24
D 20
Answer D

Id 69
Question A survey of 100 college faculty who exercise regularly found that 45 jog, 30 swim, 20
cycle, 6 jog and swim. 1 jogs and cycles, 5 swim and cycle, and 1 does all three. How
many of the faculty members just cycle?
A 19
B 20
C 15
D 14
Answer C
Id 70
Question Routine physical examinations of 500 pre primary school children revealed that 40 had
dental problems, 45 had vision problems, 55 had hearing problems, 15 had dental and
vision problems, 15 had dental and hearing problems, 20 had vision and hearing
problems, and 10 had dental, vision, and hearing problems. How many of the children had
none of the three kinds of problems?
A 360
B 370
C 390
D 400
Answer D

Id 71
Question Routine physical examinations of 500 pre primary school children revealed that 40 had
dental problems, 45 had vision problems, 55 had hearing problems, 15 had dental and
vision problems, 15 had dental and hearing problems, 20 had vision and hearing
problems, and 10 had dental, vision, and hearing problems. How many of the children had
dental problem only?
A 40
B 30
C 20
D 25
Answer C

Id 72
Question Routine physical examinations of 500 pre primary school children revealed that 40 had
dental problems, 45 had vision problems, 55 had hearing problems, 15 had dental and
vision problems, 15 had dental and hearing problems, 20 had vision and hearing
problems, and 10 had dental, vision, and hearing problems. How many of the children had
at least one problem?
A 120
B 100
C 140
D 130
Answer B
Id 73
Question Routine physical examinations of 500 pre-primary school children revealed that 40 had
dental problems, 45 had vision problems, 55 had hearing problems, 15 had dental and
vision problems, 15 had dental and hearing problems, 20 had vision and hearing
problems, and 10 had dental, vision, and hearing problems. How many of the children had
hearing problem only?
A 55
B 20
C 25
D 30
Answer D

Id 74
Question Routine physical examinations of 500 pre primary school children revealed that 40 had
dental problems, 45 had vision problems, 55 had hearing problems, 15 had dental and
vision problems, 15 had dental and hearing problems, 20 had vision and hearing
problems, and 10 had dental, vision, and hearing problems. How many of the children had
vision problem only?
A 10
B 35
C 20
D 30
Answer C

Id 75
Question In order to prepare a report on agricultural prospects for India, an adviser questions 100
farmers about their crop plans for the year. He finds that 75 intend to plant rice, 55 will
plant sunflower, 35 will plant wheat, 35 will plant rice and sunflower, 25 will plant rice
and wheat, 15 will plant sunflower and wheat, and 10 will plant all three. How many of
the farmers will plant none of them?
A 5
B 10
C 0
D 15
Answer C
Id 76
Question In order to prepare a report on agricultural prospects for India, an adviser questions 100
farmers about their crop plans for the year. He finds that 75 intend to plant rice, 55 will
plant sunflower, 35 will plant wheat, 35 will plant rice and sunflower, 25 will plant rice
and wheat, 15 will plant sunflower and wheat, and 10 will plant all three. How many of
the farmers will plant wheat only?
A 25
B 20
C 30
D 5
Answer D

Id 77
Question In order to prepare a report on agricultural prospects for India, an adviser questions 100
farmers about their crop plans for the year. He finds that 75 intend to plant rice, 55 will
plant sunflower, 35 will plant wheat, 35 will plant rice and sunflower, 25 will plant rice
and wheat, 15 will plant sunflower and wheat, and 10 will plant all three. How many of
the farmers will plant rice only?
A 25
B 35
C 30
D 40
Answer A

Id 78
Question In order to prepare a report on agricultural prospects for India, an adviser questions 100
farmers about their crop plans for the year. He finds that 75 intend to plant rice, 55 will
plant sunflower, 35 will plant wheat, 35 will plant rice and sunflower, 25 will plant rice
and wheat, 15 will plant sunflower and wheat, and 10 will plant all three. How many of
the farmers will plant sunflower only?
A 20
B 15
C 30
D 25
Answer B
Id 79
Question A merchant surveys 200 customers to see how they knew about the sale in the shop. He
found that 115 had seen television ads, 75 had heard radio ads, and 125 had read
newspaper ads. He also found that 30 received information from television and radio, 70
from television and newspapers, 25 from radio and newspapers, and 10 from all three. If
everyone else said they heard it from a friend, how many heard it from a friend?
A 10
B 5
C 15
D 0
Answer D

Id 80
Question A merchant surveys 200 customers to see how they knew about the sale in the shop. He
found that 115 had seen television ads, 75 had heard radio ads, and 125 had read
newspaper ads. He also found that 30 received information from television and radio, 70
from television and newspapers, 25 from radio and newspapers, and 10 from all three.
How many heard about the sale by radio advertisements only?
A 65
B 40
C 35
D 30
Answer D

Id 81
Question A merchant surveys 200 customers to see how they knew about the sale in the shop. He
found that 115 had seen television ads, 75 had heard radio ads, and 125 had read
newspaper ads. He also found that 30 received information from television and radio, 70
from television and newspapers, 25 from radio and newspapers, and 10 from all three.
How many heard about the sale by newspaper advertisements only?
A 115
B 100
C 40
D 65
Answer C
Id 82
Question A merchant surveys 200 customers to see how they knew about the sale in the shop. He
found that 115 had seen television ads, 75 had heard radio ads, and 125 had read
newspaper ads. He also found that 30 received information from television and radio, 70
from television and newspapers, 25 from radio and newspapers, and 10 from all three.
How many heard about the sale by television advertisements only?
A 105
B 95
C 65
D 25
Answer D

Id 83
Question A merchant surveys 200 customers to see how they knew about the sale in the shop. He
found that 115 had seen television ads, 75 had heard radio ads, and 125 had read
newspaper ads. He also found that 30 received information from television and radio, 70
from television and newspapers, 25 from radio and newspapers, and 10 from all three.
How many heard about the sale by at least one type of advertisement?
A 190
B 170
C 180
D 200
Answer D

Id 84
Question A survey of 80 students in a college showed that 36 students took English, 32 took
history,32 took political science, 16 took political science and history, 16 took history and
English, 14 took political science and English, 6 took all three. How many students took
English and neither of the other two?
A 30
B 20
C 28
D 12
Answer D
Id 85
Question A survey of 80 students in a college showed that 36 students took English, 32 took
history,32 took political science, 16 took political science and history, 16 took history and
English, 14 took political science and English, 6 took all three. How many students took
non of the three courses?
A 30
B 20
C 40
D 50
Answer D

Id 86
Question A survey of 80 students in a college showed that 36 students took English, 32 took
history,32 took political science, 16 took political science and history, 16 took history and
English, 14 took political science and English, 6 took all three. How many students took
History but neither of the other two?
A 20
B 14
C 10
D 6
Answer D

Id 87
Question A survey of 80 students in a college showed that 36 students took English, 32 took
history,32 took political science, 16 took political science and history, 16 took history and
English, 14 took political science and English, 6 took all three. How many students took
Political science but neither of the other two?
A 22
B 16
C 10
D 8
Answer D
Id 88
Question In a group of 12 students,4 are wearing white T-shirts and 10 are wearing black shorts.If
all your team mates are required to wear one or the other, how many are wearing both?

A 4
B 6
C 8
D 2
Answer D

Id 89
Question In a restaurant 40 customers ordered fries, 13 customers put salt on their fries, 28
customers put ketch up on their fries, 6 put both, how many eat their fries plain?
A 8
B 5
C 6
D 7
Answer B

Id 90
Question You have 5 small blue marbles, 8 small green marbles, 3 large blue marbles and 17
marbles in total, how many large green marbles do you have?
A 9
B 11
C 1
D 8
Answer C

Id 91
Question There are 12 houses on a road, 7 are painted white and 3 are painted with white and red
color. How many are painted with only red colour if only white and red color are used for
painting the houses?
A 2
B 5
C 9
D 10
Answer B
Id 92
Question A survey of 70 high school students revealed that 35 like folk music. 15 like classical
music and 5 like both. How many of the students surveyed do not like either folk or
classical music?
A 15
B 20
C 25
D 50
Answer C

Id 93
Question A survey of 80 high college students revealed that 40 like pop music. 20 like classical
music and 10 like both. How many of the students surveyed like pop music only?
A 60
B 50
C 40
D 30
Answer D

Id 94
Question A survey of 80 high school students revealed that 40 like folk music. 20 like classical
music and 10 like both. How many of the students surveyed do not like either folk or
classical music?
A 10
B 20
C 30
D 40
Answer C

Id 95
Question In a survey conducted for 2000 people 1750 drank tea, 820 drank coffee and while 625
drank both. Then number of people who drank neither is
A 65
B 55
C 45
D 60
Answer B

Id 96
Question 1.If A and B are disjoint sets then | A –B | is equal to

A | B – A|
B | A|
C |A | –| B |
D Φ
Answer B

Id 97
Question If A = { 1, 2, 3, ……, 9, 10}, B = {1 , 2, 4, 8}, C = {1, 2, 3, 5, 7}, D = { 2, 4, 6, 8}
then (B –C) –D is
A {4, 8}
B Φ
C {8}
D {4}
Answer B

Id 98
Question A ⊕ B is set equal to
A A–A∩ B
B (A –B) ∩ (B –A)
C (A ∪ B) – (A ∩ B)
D A∩ B –A
Answer C

Id 99
Question p Λ q is T when
A p is T, q is F
B p is F, q is T.
C p is T, q is T
D p is F, q is F
Answer C

Id 100
Question ¬p V q is F when
A p is T q is F
B p is F, q is T.
C p is T, q is T
D p is F, q is F
Answer A

Id 101
Question p V ¬q is F when
A p is T q is F
B p is F, q is T.
C p is T, q is T
D p is F, q is F
Answer B

Id 102
Question ¬ (p V q) is equivalent to
A ¬p V ¬q
B ¬p Λ q
C ¬p Λ ¬q
D p Λ ¬q
Answer C

Id 103
Question p Λ ¬p is logically equivalent to
A Tautology
B p
C ¬p
D contradiction
Answer D

Id 104
Question p V ¬p is logically equivalent to
A Tautology
B p
C ¬p
D contradiction
Answer A

Id 105
Question p V p is logically equivalent to
A Tautology
B p
C ¬p
D contradiction
Answer B

Id 106
Question Let p : It is below freezing ; q : it is snowing
Then represent : It is below freezing and snowing.
A pΛq
B p Λ ¬q
C ¬p Λ ¬q
D pVq
Answer A

Id 107
Question Let p : It is below freezing ;
q : it is snowing
Then represent :It is below freezing but not snowing.
A pΛq
B p Λ ¬q
C ¬p Λ ¬q
D pVq
Answer B

Id 108
Question Let p : It is below freezing ;
q : it is snowing
Then represent :It is not below freezing and not snowing
A pΛq
B p Λ ¬q
C ¬p Λ ¬q
D pVq
Answer C

Id 109
Question Let p : It is below freezing ;
q : it is snowing
Then represent :It is either snowing or below freezing or both
A pΛq
B p Λ ¬q
C ¬p Λ ¬q
D pVq
Answer D

Id 110
Question p : I will be happy
q : I pass the exam.
Identify : I will be happy only if I pass the exam.

A pΛq
B p →q
C q →p
D pVq
Answer B

Id 111
Question If q → ¬p is F then,

A p is T, q is T
B p is T q is F

C p is F q is T
D q is f, p is F
Answer A

Id 112
Question Let p : It is below freezing ;
q : it is snowing
Then represent :If it is below freezing, then it is also snowing.
A p →q
B (p V ¬q) Λ ( p → ¬q)
C q↔p
D q →p
Answer A

Id 113
Question Let p : It is below freezing ;
q : it is snowing
Then represent :It is either below freezing or snowing, but it is not snowing if it is below
freezing
A p →q
B (p V ¬q) Λ ( p → ¬q)
C q↔p
D q →p
Answer B

Id 114
Question Let p : It is below freezing ;
q : it is snowing;
Then represent :It is below freezing is necessary and sufficient condition for it to be
snowing.
A p →q
B (p V ¬q) Λ ( p → ¬q)
C q↔p
D q →p
Answer C

Id 115
Question A proof that begins by asserting a claim and proceeds to show that the claim cannot be
true is by
A Induction;
B construction;
C contradiction;
D prevarication;
Answer C

Id 116
Question Induction is a
A Algorithm
B Program
C Proof Method
D Procedure
Answer C

Id 117
Question The induction principle makes assertions about
A Infinite sets
B Large finite sets
C Small finite sets
D Logical formulas
Answer A

Id 118
Question In an inductive proof, showing that P(x) implies P(x + 1) is
A The base step
B The inductive step
C Sufficient to prove P(x) for some x
D Sufficient to prove P(x) for all x
Answer B

Id 119
Question Which of the following statement is the negation of the statement , “2 is even and –3 is
negative”
A 2 is even and –3 is not negative
B 2 is odd and –3 is not negative
C 2 is even or –3 is not negative
D 2 is even or –3 is not negative
Answer D

Id 120
Question ∩ denotes
A Set membership
B Intersection
C Conjunction
D Negation
Answer B

Id 121
Question {} is a subset of
A Itself
B No set
C All set
D Only infinite set
Answer C

Id 122
Question Following are two sentences. A:2+3=5 B: Read this carefully
Which of the following is correct
A A and B both are proposition
B A is proposition but B is not
C B is proposition but A is not
D Both A and B are not proposition
Answer B

Id 123
Question p: Today is Sunday q: Today is holiday contrapositive of “ Today is Sunday hence it is
holiday is”
A If today is not holiday then it is not Sunday
B If today is not Sunday then it is not holiday
C If today is holiday then it is Sunday
D Today is Sunday hence it is holiday
Answer A
Id 124
Question The description of the shaded region in the following figure using the
operations on set is

A C∪(A ∩ B)
B (C − ((A ∩C)∪(C∩B)))∪(A ∩B)
C (C − (A ∩C)∪(C∩ B))∪(A ∩B)
D A ∪ B∪C − (C∪(A ∩B)
Answer B

Id 125
Question If A and B are two subsets of a universal set then A-B IS equivalent to
A A ∩Β
B B–A
C A UΒ
D A
Answer A

Id 126
Question Consider a set S of integers from 1 to 250. A denotes the set of integers divisible by 3,B denotes
the set of integers divisible by 5 and C denotes the set of integers divisible by 7 then |A| is
A 125
B 50
C 83
D 35
Answer C

Id 127
Question Consider a set S of integers from 1 to 250. A denotes the set of integers divisible by 3,B denotes
the set of integers divisible by 5 and C denotes the set of integers divisible by 7 then |A ∩ C|
A 16
B 11
C 07
D 35
Answer B

Id 128
Question Number of elements divisible by 3 or 5 but not by 7

A 135
B 100
C 35
D 117
Answer B

Id 129
Question If 'p' stands for 'I run fast' and 'q' stands for 'I shall win', then symbolic form of ,'I do not run fast'
A p
B ~p
C q
D ~p
Answer B

Id 130
Question V denotes
A Set membership
B Or
C And
D Relation between Sets
Answer B

Id 131
Question Ø denotes
A Set membership
B Empty set
C Conjunction
D Negation
Answer B

Id 132
Question If A, B, C be three sets such that A ∪ B = A ∪ C and A ∩ B = A ∩ C, then.
A A=B
B A=B=C
C B=C
D A=C
Answer C

Id 133
Question The union of two sets A & B is the set containing of all elements which are in A, or in B, or in
both sets A & B.

A True
B False
C
D
Answer A

Id 134
Question The intersection of two sets A & B is the set consisting of elements which are in A as well
as in B.
A True
B False
C
D
Answer A

Id 135
Question ~A=U-A
A True
B False
C
D
Answer A

Id 136
Question A – B = A ∩ ~B
A True
B False
C
D
Answer A

Id 137
Question A symmetric difference of A with B = (A – B ) U (B – A )
A True
B False
C
D
Answer A

Id 138
Question A symmetric difference with B = (A – B ) ∩ (B – A )
A True
B False
C
D
Answer B

Id 139
Question De Morgan’s law state that
A ~(AUB)=~A∩ ~B
B (AUB)=(BUA)
C ~(A∩B)=~AU ~B
D Both A & C
Answer D

Id 140
Question The set having no element is called
A Empty set
B Null set
C Void set
D All of the above
Answer D

Id 141
Question For any three non empty sets A, B, C |AUBUC|= ____________
A |A|+ |B|+|C|+ |A∩B|+|A∩C|+|B∩C|+|A∩B∩C|
B |A|+ |B|+|C|- |A∩B|-|A∩C|-|B∩C|-|A∩B∩C|
C |A|+ |B|+|C|- |A∩B|-|A∩C|-|B∩C|+|A∩B∩C|
D |A|+ |B|+|C|
Answer C

Id 142
Question If A= {1,2,3,4}, B={4,5,6,7 } then A-B is ______
A {1,2,3,4,5,6,7}
B {5,6,7}
C {1,2,3}
D {4}
Answer C

Id 143
Question If A= {1,2,3,4}, B={4,5,6,7 } then B-A is ______
A {1,2,3,4,5,6,7}
B {5,6,7}
C {1,2,3}
D {4}
Answer B

Id 144
Question If A= {1,2,3,4}, B={4,5,6,7 } then AUB is ______
A {1,2,3,4,5,6,7}
B {5,6,7}
C {1,2,3}
D {4}
Answer A

Id 145
Question A, B, C are finite sets with |A|=6, |B|=8 , |C|=6, |AU B U C|=11, |A∩B|=3, |A∩ C|=2, and
|B∩C|=5. Then |A∩B∩C|= ?
A 0
B 1
C 2
D 3
Answer B
Id 1
Question Let A={1, 2, 3} B={2, 4, 6} then the relation R = {(a,b) | b = 2a} is
A {(2,1), (4,2), (6,3)}
B {(1,1), (2,2), (3,3)}
C {(1,2), (2,4), (3,6)}
D {(1,2), (2,4), (3,8)}
Answer C

Id 2
Question If set A={1,2,3,4,5} and R on A is {(a,b) | b = a +1}, then what is R-1 ?
A {(1,1), (2,2), (3,3), (4,4), (5,5)}
B {(2, 1),(3, 2),(4, 3),(5, 4)}
C {(1,2),(2,3),(3,4),(4,5)}
D {(2, 3),(3, 2),(4, 3),(5, 6)}
Answer B

Id 3
Question If set A={1,2,3,4,5} and a relation R is defined on A as xRy iff y = x + 1, then R2 is
A {(1,3),(2,4),(2,5)}
B {(1,3),(2,4),(3,5)}
C {(1,4),(2,5)}
D {(1,3),(2,4),(2,5)}
Answer B

Id 4
Question Let A={1,2,3,4,}, B={a,b,c} and a relation R={(1,a),(1,b),(2,b),(2,c),(3,b),(4,a)} then Rc
is
A {(1,c),(2,a),(3,a),(3,c),(4,b),(4,c)}
B {(1,a),(1,b),(2,a),(2,b),(3,a),(3,c)}
C {(2,a),(2,b),(2,c),(3,a),(3,b),(4,c)}
D {(2,a),(2,b),(2,c),(3,c),(3,b),(4,c)}
Answer A
Id 5
Question Let A={1,2,3,4} and R={(1,1),(1,2),(2,3),(3,4)} ; S={(3,1),(4,4),(2,4),(1,4)} be two
relations on A, then the relation (SoR) is
A {(1,4),(2,1),(3,4)}
B {(3,1),(3,2)}
C {(1,4),(2,4),(3,4),(4,4)}
D {(1,4),(2,3),(3,4),(4,4)}
Answer A

Id 6
Question Which of these collections of subsets is not a partition of {1,2,3,4,5,6}?
A {1},{2,3,6},{4},{5}
B {1,4,5},{2,3,6}
C {2,4,6},{1,3,5}
D {1,2},{2,3,4},{4,5,6}
Answer D

Id 7
Question Let A={1,2,3,4} and R={(1,1), (1,2), (2,1), (2,2), (3,4), (4,3), (3,3), (4,4)} be a relation on
A then R is
A Reflexive but not symmetric
B Symmetric but not Reflexive
C Transitive but not symmetric
D Equivalence relation
Answer D

Id 8
Question Let A={1,2,3,4} and B={a,b,c}. Let S be a relation from A to B defined by S={(1,a),(2,b),
(2,c), (3,c)} is
A One to one function
B On-to function
C One to many function
D Not a function
Answer D
Id 9
Question If A={3,4} and B={5,-5}, which of the following is a function from A to B?
A {(4,5), (4,-5), (3,5)}
B {(4,5), (4,-5)}
C {(3,5), (4,-5)}
D {(5,3), (-5,4)}
Answer C

Id 10
Question Let R={(1,2),(3,4),(2,2)} and S={(4,2),(2,5),(3,1),(1,3)} be relations on a set
A={1,2,3,4,5}, then So(RoS) is
A {(3,4),(1,2)}
B {(1,5),(3,2),(2,5)}
C {(4,5),(3,5),(1,2)}
D {(4,5),(3,5),(1,3)}
Answer C

Id 11
Question If A={ a :1 ≤ a ≤ 2} and B = {b: 0 ≤ b ≤ 1 } , where a , b∈Z (set of integers) then
what is A× B ?
A {(0,1), (1,2)}
B {(0,1), (0,2), (1,1), (1,2)}
C {(1,0), (1,1), (2,1), (2,2)}
D {(1,0), (2,1)}
Answer B

Id 12
Question If A={ 2,3} and B = {3,4,5,6 } and R is relation from A to B defined as (a , b)∈ R if
"a divides b".Then R is equal to
A {(2,4),(2,6),(3,3),(3,6)}
B {(6,2),(6,4),(6,3)}
C {(2,6),(3,6)}
D {(4,2),(6,2),(3,3),(6,3)}
Answer A
Id 13
Question If A={ 3,4,5} and R is a relation on A defined as aRb iff a < b, then R is equal to
A {(3,4),(3,5)}
B {(4,3),(4,5)}
C {(3,4),(3,5),(4,5)}
D {(3,4),(3,5),(4,4),(4,5)}
Answer C

Id 14
Question If A={ 1,2,3,4}, B = {a,b,c } and R is a relation from A to B defined as R={(1,a),(3,a),
(3,c)}, then inverse of R is equal to
A {(3,a), (2,c), (3,b)}
B {(1,c), (2,b), (2,c), (3,b)}
C {(a,1),(a,3),(c,3)}
D {(a,4),(a,2),(c,3)}
Answer C

Id 15
Question What is the minimum number of students needed in a class to be sure that at least 6 to get
the same grade (assume that 5 grades are possible)?
A 22
B 24
C 26
D 28
Answer C

Id 16
Question What’s the minimum number of students, each of whom comes from one of the 50
countries must be enrolled in a university to guarantee that there are at least 100 who
come from the same country?
A 4981
B 4951
C 5149
D 1459
Answer B
Id 17
Question If 100 people are in a room, what is the minimum number of people born on the same
month ?
A 9
B 10
C 8
D 7
Answer A

Id 18
Question If R is relation on a set A and if (a ,b)∈ R →(b ,a)∈R , where a , b∈ A , then R is
A Reflexive relation
B Antisymmetric relation
C Symmetric relation
D Transitive relation
Answer C

Id 19
Question If R is relation on a set A and if (a ,b) ,(b , c)∈R →(a , c)∈R , where a , b , c∈ A ,
then R is
A Symmetric relation
B Antisymmetric relation
C Reflexive relation
D Transitive relation
Answer D

Id 20
Question If R is relation on a set A and if (a ,b) ,(b , a)∈R → a=b , where a , b∈ A then R is
A Symmetric relation
B Antisymmetric relation
C Reflexive relation
D Transitive relation
Answer B
Id 21
Question If a relation R is an equivalence relation, then it is
A Transitive and antisymmetric
B Reflexive and antisymmetric relation
C Symmetric and irreflexive relation
D Reflexive ,symmetric and transitive
Answer D

Id 22
Question A relation ‘R’ on a set ‘A’ is called partial order relation if R is
A Reflexive and symmetric relation
B Transitive and symmetric relation
C Reflexive ,antisymmetric and transitive
D Irreflexive and symmetric
Answer C

Id 23
Question If R is a relation defined on a set A, then the transitive closure of R is
A Smallest transitive relation containing R
B Smallest reflexive relation containing R
C Smallest symmetric relation containing R
D None of these
Answer A

Id 24
Question If (A , R) is a 'poset' with a partial order relation R , then any subset of A in which every
pair of elements are related , is called
A Upper bound
B Chain
C Anti-Chain
D Lower bound
Answer B
Id 25
Question If (A , R ) is a 'poset' with a partial order relation R , then any subset of A in which no two
elements in the subset are related , is called
A Upper bound
B Chain
C Anti-Chain
D Lower bound
Answer C

Id 26
Question If A={ a,b} and R is a relation on A where R={(a,a),(a,b),(b,b)}. Then R is a
A Equivalence relation
B Partial order relation
C Symmetric relation
D Tolerance relation
Answer B

Id 27
Question If R is a relation on a set of all strings of 0's and 1's such that R={(a,b): a and b are strings
having same number of zeros}; then R is
A Antisymmetric relation
B Symmetric relation
C Partial order relation
D Asymmetric relation
Answer B

Id 28
Question Consider the relation R defined on the set Z (integers) as R={(x,y): x ≤ y}. Then R is
A Symmetric relation
B Antisymmetric relation
C Equivalence relation
D None of these
Answer B
Id 29
Question If L is a set of lines in a plane and R is a relation on L defined as R={(a,b): a is
perpendicular to b }. Then R is
A Reflexive relation
B Equivalence relation
C Transitive relation
D Symmetric relation
Answer D

Id 30
Question If R is an equivalence relation on the set A ={1, 2, 3}defined as R={(1,1),(1,2),(2,1),(2,2),
(3,3)}, then the equivalence class of 2 is
A {1}
B {1,2}
C {3}
D {1,2,3}
Answer B

Id 31
Question If A = {5,6,7,8} and R is an equivalence relation defined on the A as R={(5,5),(6,6),(7,7),
(7,8),(8,7),(8,8)}; then the equivalence class of 7 is
A {7}
B {8}
C {5,6}
D {7,8}
Answer D

Id 32
Question If two functions f and g are defined as f (x) = x + 2 and g(x) = x − 2 , then the composite
function gof is given by
A x−2
B x+2
C x
D x+4
Answer C
Id 33
Question If function f and g are defined as f (x)=2x+3 and g(x)=3x+4 , then composite function gof
is given by
A 6x + 11
B 6x + 13
C 7x + 5
D 7x + 6
Answer B

Id 34
Question If a function f: R→R is defined on the set of 'Real' numbers (R) as f(x) = 2x, then
A f is injective and surjective
B f is not injective but surjective
C f is injective but not surjective
D None of these
Answer A

Id 35
Question Two functions f and g are defined on a set X={1,2,3} as f ={(1,2)(2,3),(3,1)} and g =
{(1,2),(2,1),(3,3)}, then fog is:
A {(2,1),(2,3),(3,1)}
B {(1,3),(3,1),(2,2)}
C {(2,2)}
D {(1,3),(2,2)}
Answer B

Id 36
Question If A=B= {1,2,3,4} and f:A→B given by f={(1,1),(2,3),(3,4),(4,2)} then f is
A one-one ,but not onto function
B one-one and onto function
C onto ,but not one-one function
D neither one-one ,nor onto function
Answer B
Id 37
Question If set A={1,2,3,4,5} and a relation R on A is defined as xRy iff y = x +1; then R-1 is
A {(1,1),(2,2),(3,3),(4,4),(5,5)}
B {(1,2),(2,3),(3,4),(4,5)}
C {(2,1),(3,2),(4,3),(5,4)}
D None of these
Answer C

Id 38
Question Let A={1,2,3,4} and R={(1,2), (2,3), (3,4), (2,1)}, then the transitive closure of R is
A {(1,1), (1,2),(1,3),(1,4) (2,1),(2,2),(2,3),(2,4),(3,4)}
B {(1,2),(1,3),(1,4) (2,1),(2,2),(2,3)}
C {(1,1),(1,3),(2,4),(3,2)}
D None of these
Answer D

Id 39
Question Given A={p, q, r, s} and B={1, 2, 3} which of the following relations from A to B is not a
function?
A {(p,1),(q,2),(r,1),(s,2)}
B {(p,1),(q,1),(r,1),(s,1)}
C {(p,2),(q,3),(r,2),(s,2)}
D {(p,1),(q,2),(p,2),(s,3)}
Answer D

Id 40
Question Consider the relation “a divides b” on A = {1,2,3,6,12,18}. What are the immediate
predecessors of the element 6?
A 12 and 18
B 1 and 2
C 1 and 3
D 2 and 3
Answer D
Id 41
Question Is the following Hasse diagram a lattice?
e

C 11111 d
b 111

A No
B Yes
C Both options A and B are correct
D None of the above
Answer B

Id 42
Question Let A={1, 2, 5, 7, 10, 14, 35, 70} and R be a binary relation such that (a, b) Î R if ‘b’ is
divisible by ‘a’; then which of the following statement is correct?
A (A,R) is not a lattice
B (A,R) is a lattice
C Both options A and B are correct
D Both options A and B are wrong
Answer B

Id 43
Question Is the following Hasse diagram a lattice?
70

35

A No
B Yes
C Both options A and B are correct
D None of the above
Answer B

Id 44
Question If S={1,3,5,15,30} and aRb iff 'b is divisible by a', then chain(s) of S is (are)
A {1,3,5,15}
B {1,3 15,30}
C {1,5,15,30}
D Both (B) and (C)
Answer D

Id 45
Question A Lattice is a poset (B, R) in which every subset {a,b} of set B has
A A least upper bound
B A greatest lower bound
C Both options A and B
D None of these
Answer C

Id 46
Question If A={1,2,3,4,6} and aRb iff 'b is divisible by a', then the relation R is
A {(1,2),(2,4),(3,6)}
B {(1,1),(1,2),(1,3),(1,4),(1,6),(2,4),(2,6),(3,6)}
C {(1,1),(2,2),(2,4),(2,6),(3,6)}
D None of these
Answer D

Id 47
Question The relation { (1,2), (1,3), (3,1), (1,1), (3,3), (3,2), (1,4), (4,2), (3,4)} is
A Reflexive
B Transitive
C Symmetric
D Asymmetric
Answer B

Id 48
Question If R is a relation “less than” from A = {1,2,3,4} to B = {1,3,5} then RoR-1 is

A {(3,3), (3,4), (3,5)}


B {(3,1), (5,1), (3,2), (5,2), (5,3), (5,4)}
C {(3,3), (3,5), (5,3), (5,5)}
D {(1,3), (1,5), (2,3), (2,5), (3,5), (4,5)}
Answer C

Id 49
Question Let R = { ( 3, 3 ) ( 6, 6 ) ( ( 9, 9 ) ( 12, 12 ), ( 6, 12 ) ( 3, 9 ) ( 3, 12 ), ( 3, 6 ) } be a relation
on the set A = { 3, 6, 9, 12 }. The relation is
A Reflexive and transitive
B Reflexive only
C An equivalence relation
D Reflexive and Symmetric only
Answer A

Id 50
Question Let R = { (1, 3 ), (4, 2), (2, 4), (2, 3), (3, 1) } be a relation on the set A = { 1, 2, 3,4 }. The
relation R is
A Asymmetric
B Not symmetric
C Transitive
D Reflexive
Answer B

Id 51
Question Find the range of the function f(x) = 2x2, if the domain is {-2, -1, 0, 3, 4}
A {-4,-2,0,6,8}
B {8,2,0,18,32}
C {-8, -2, 0,18,32}
D None of these
Answer B
Id 52
Question If A={a,b,c} and a relation R on A is defined by R={(a,b),(b,a),(a,a),(b,b)}; then R is
A Reflexive and symmetric
B Antisymmetric and transitive
C Reflexive and transitive
D Symmetric and transitive
Answer D
Marks 2
Unit 2

Id 53
Question If A = {1,2,3,4,5} and R on A is defined by R={(a,b) | b – a = 1}, then
A R={(1,2),(2,3),(3,4),(4,5)}
B R={(2,1),(3,2),(4,3),(5,4)}
C R={(1,2),(2,3),(3,4),(4,5), (2,1),(3,2),(4,3),(5,4)}
D None of these
Answer A

Id 54
Question If A={2,3,5,6,10,15,30} and aRb iff 'b is divisible by a', then minimal elements of A are
A 2 and 3
B 3 and 5
C 2 and 5
D 2, 3 and 5
Answer D

Id 55
Question If A={2,3,5,6,10,15,30} and aRb iff a|b (a divides b) then maximal element(s) of A are
A 15 and 30
B 10 and 30
C Only 30
D None of these
Answer C
Id 56
Question If A={2,3,5,6,10,15,30,45} and aRb iff a|b (a divides b) then upper bound of 2 and 3 are
A 10 and 15
B 6 and 30
C 10 and 30
D 30 and 45
Answer B

Id 57
Question If A={2,3,5,6,10,15,30,45} and aRb iff a|b (a divides b) then the greatest lower bound of
30 and 45 is
A 10 and 15
B Only 15
C Only 30
D 15 and 30
Answer B

Id 58
Question If A={2,3,5,6,10,15,30,45} and aRb iff a|b (a divides b) then lower bound of 30 and 45
are
A 3
B 5
C 15
D All of these
Answer D

Id 59
Question If A={1,2,3,4,5,6} and R on A is {(1,3), (3,1), (1,5), (5,1), (6,4), (4,6), (5,3), (3,5), (2,6),
(6,2), (1,1), (2,2), (3,3), (4,4), (5,5), (6,6)} then equivalence class of 6 and 5 are
A {4,2,3} and{1,5,4}
B {4,2,6} and {1,3,5}
C {2 6 5} and {3,1,5}
D {2 6 3} and {3,1,6}
Answer B
Id 60
Question If A={1,2,3,4} and B={a,b,c} and R={(1,a),(3,a),(3,c)} then domain of R-1 is
A {a,c}
B {a,b,c}
C {1,3}
D {b,c}
Answer A

Id 61
Question If A={a,b,c,d} and R={(a,a),(a,b),(b,d)} then R2 is
A {(a,a),(a,b),(b,d)}
B {(a,a),(b,d),(a,d),(a,b)}
C {(a,a),(b,b),(d,d)}
D None of these
Answer A

Id 62
Question Let A={1,2,3,5} and aRb iff a|b (a divides b) then (A,R) is a poset. The anti-chains are
A {2,3},{3,5},{1,5}
B {3,5},{2,5},{1,3}
C {3,5},{1,5},{1,3}
D {2,3),{2,5},{3,5}
Answer D

Id 63
Question Let two functions f and g be defined by f(x) = 2x + 1 and g(x) = x2 – 2 , then gof(4) is
A 78
B 79
C 29
D 30
Answer B
Id 64
Question Let two functions f and g be defined by f(x) = 2x + 1 and g(x) = x2 – 2 , then fog(4) is
A 79
B 80
C 29
D 30
Answer C

Id 65
Question Let functions f and g be defined by f(x) = x + 2 and g(x) = 3x , then gof is
A 3x+6
B 3x+8
C 3x+9
D None of these
Answer A

Id 66
Question An equivalence class of an element a is denoted as
A [a]
B (a)
C {a}
D None
Answer A

Id 67
Question Find the domain for the relation: {(1,2), (5,3), (3,6),(2,4)}

A {1,2,3,5}
B {2,3,4,6}
C {1,3,4,6}
D None
Answer A
Id 68
Question If f is a function from set A to set B then which is true ?
A A is known as domain set
B A is known as range set
C A is known as master set
D None
Answer A

Id 69
Question Which statement is true?
A Every relation is a function
B Every function is a relation
C Both A & B
D None of these
Answer B

Id 70
Question which of the statement is true?
A A relation can be of the type one to many
B A function can be of the type one to many
C Both A and B
D None of these
Answer A

Id 71
Question If a relation R is symmetric and transitive, then it is called
A Equivalence relation
B Tolerance relation
C Poset
D None of these
Answer B
Id 72

Question R={(1,1),(1,2),(2,1),(2,2),(3,3),(3,4),(4,3),(4,4)} Determine whether the relation is


reflexive,symmetric and transitive?
A Reflexive and tranistive
B Reflexive and symmetric
C Reflexive ,Symmetric and transitive
D Symmetric and transitive
Answer C

Id 73
Question If S = {1,2,3,4,5,6,7,8,9} Find valid partition
A {{1,3,5},{2,6},{4,8,9}}
B {{1,3,5},{2,6,7},{4,8,9}}
C {{1,3},{5,2,6},{4,8}}
D {{1,3},{4,5},{6,7,8,9}}
Answer B

Id 74
Question If number of elements in sets A and B are m and n receptively, then the number of
elements in A X B is
A 2m+n
B 2mn
C m+n
D m.n
Answer D
Id 75
Question A={1,2,3,4} , R={(1,1),(1,2),(2,1),(2,2),(3,1),(3,3),(1,3),(4,1),(4,4)} Determine whether
the relation R on the set A is equivalence relation
A It is not symmetric so not an equivalence relation .
B It is an equivalence relation.
C It is not transitive and symmetric so not an equivalence relation.
D It is not reflexive,symmetric and transitive so not an equivalence relation.
Answer B
Marks 2
Unit 2

Id 76
Question Define an equivalence relation R on the positive integers A = {2, 3, 4, . . . , 20} by m R n
if the largest prime divisor of m is the same as the largest prime divisor of n. The
number of equivalence classes of R is
A 8
B 9
C 10
D none
Answer A

Id 77
Question Identify the property of Lattice .
A a∨(a∨b) =a

B a∧(a∧b)=b

C a∨(a∧b) =a
D a∧(a∨b)=b
Answer C
Id 79
Question Which of the following is true

A Every relation is function


B Every function is relation
C Every equivalence relation not partial order relation
D Every one-one function has its inverse
Answer B

Id 80
Question If R is a relation on AXA where A is a set of natural numbers such that <a,b>R<c,d> if
a+d=b+c then
A R is partial order relation
B R is equivalence relation
C R is antisymmetric
D R is irreflexive
Answer B

Id 81
Question The binary relation R = {(0, 0),(1, 1)} on A = {0, 1, 2, 3, } is
A Reflexive, Not Symmetric, Transitive
B Not Reflexive, Symmetric, Transitive
C Reflexive, Symmetric, Not Transitive
D Reflexive, Not Symmetric, Not Transitive
Answer B
Id 82
Question A relation is not a
A set of ordered pairs
B set of numbers
C su8bset of a Cartesian product
D way to express how two sets are related
Answer B
Id 83
Question Consider the divides relation, m | n, on the set A = {2, 3, 4, 5, 6, 7, 8, 9, 10}. The
cardinality of the covering relation for this partial order relation (i.e., the number of edges
in the Hasse diagram) is
A 4
B 5
C 6
D 7
Answer D
Id 84
Question R is a relation defined in Z by aRb if and only if ab ≥ 0 then R is
A Reflexive
B Symmetric
C Transitive
D Equivalence relation
Answer D

Id 85
Question Let R be an equivalence relation defined in A. Let п be a set of equivalence classes of A
with respect to the relation R then [a] =
A {x : xϵA and (x,a) ϵ R}
B {x : xϵA and (a,x) ϵ R}
C {x : xϵA and (x,x) ϵ R}
D All of these
Answer A

Id 86
Question

Consider the Hasse diagram for(P, ≤ ) where A=(1,2,3,4,6,24,36,72) what does the
meaning of ≤ for the given relation a ≤ b
A a divides b
B b divides a
C a=b
D None of these
Answer A
Id 87
Question In the following diagram identify it is Lattice or not ?
£

c • ~ - - - - - -• d

c
\.~ .
~ ./ b
a

A It is not a lattice.
B Lub doesnot exist.
C Glb exists and lub doesnot exist.
D It is lattice .
Answer D

Id 88
Question The relation on set A ={1,2,3} is given as R={(1,2),(1,3)} what is the converse of a given
relation R
A R={(1,1),(1,3)}
B R={(2,1,),(3,1)}
C R={(1,2),(3,3)}
D R={(2,1),(2,3),(3,1),(3,2)}
Answer B

Id 89
Question Let f: A→B. If two or more elements have the same image in B,then f is said to be
A Many to one
B Injective
C Surjective
D Bijective
Answer A
Id 90
Question Let A ={1,2,3} and B ={a,b,c,d}.The function f:A→B is defined below
f= {(1,a),(2,a),(3,d)} then the f is
A injective
B surjective
C bijective
D None of these
Answer D

Id 91
Question Select the property of an inverse function.
A Only bijective functions have inverse
B If function A→B is bijective then inverse of function B→A
C If function A→B is bijective then inverse of function is unique.
D All of these
Answer D

Id 92
Question Check whether the following two graphs are isomorphic or not?
A The graphs are isomorphic
B The graphs are different in number of edges and nodes
C The graphs are not isomorphic
D None of these
Answer A

Id 93
Question Let A=({a,b,c} then the relation R={(a,a),(b,b),(c,c)} is
A antisymmetric
B transitive
C Reflexive
D None of these
Answer C
Id 94
Question Let R = { ( 3, 3 ) ( 6, 6 ) ( ( 9, 9 ) ( 12, 12 ), ( 6, 12 ) ( 3, 9 ) ( 3, 12 ), ( 3, 6 ) } be a relation
on the set A = { 3, 6, 9, 12 }. The relation is
A reflexive and transitive
B reflexive only
C an equivalence relation
D reflexive and symmetric only
Answer A
Id 95
Question The relation R defined on the set A = {1, 2, 3, 4, 5} by R = {(x, y) : | x2 – y2| < 16} is
given by
A {(1, 1), (2, 1), (3, 1), (4, 1), (2, 3)}

B {(2, 2), (3, 2), (4, 2), (2, 4)}

C {(3, 3), (4, 3), (5, 4), (3, 4)}

D None of the above

Answer D

Id 96
Question If seven numbers from 1 to 12 are chosen,then two of them will add up to 13.
A It uses Pigeonhole principle
B It uses extended Pigeonhole principle
C It uses Pigeonhole principle and Extended Pigeonhole principle
D None of these
Answer A

Id 97
Question (A ∩ B) Χ (C ∩ D) =

A (A ∩ C) Χ (B ∩ D)

B (A ∩ A) Χ (B ∩ D)

C (A Χ C) ∩ (B X D)

D (A Χ B) ∩ (B X D)

Answer C
Id 98
Question Let A = {1,2,3,4} and B = {a,b,c}. Let R = {(1,a),(1,b),(2,b),(2,c),(3,b),(4,a)} what is
R∼ 1 .
A {(1,c),(1,b),(1,c),(c,2),(b,3),(a,4)}
B {(a,1),(b,1),(b,2) ,(c,2),(b,3),(a,4)}
C {(a,1),(b,1),(b,2) ,(c,2),(b,3),(a,4)}
D {(a,1),(b,1),(b,2),(b,3),(a,4)}
Answer B

Id 99
Question A function is one to one and onto if
A Every element in domain is having atleast one image.
B Every element in domain is not necessarily having an image.
C Every element in domain must have one to one correspondence to co-domain and every
co-domain element is mapped to element in domain .
D None of these
Answer C
Id 1
Question If G is an undirected planer graph on n vertices with e edges then ?
A
e<=n
B e<=2n
C e<=3n
D None of these

Answer B
Id 2
Question Which of the following statement is false ?
A
G is connected and is circuitless
B G is connected and has n edges
C G is minimally connected graph
D G is circuitless and has n-1 edges

Answer B
Marks 1
Unit 4
Id 3
Question A tour of G is a closed walk of graph G which includes every edge G at least once. A
……. tour of G is a tour which includes every edge of G exactly once ?
A
Hamiltonian
B Planar
C Isomorphic
D Euler

Answer
Id 4
Question Which of the following is not a type of graph?
A
Euler
B Hamiltonian
C Tree
D Path

Answer D

Id 5
Question Choose the most appropriate definition of plane graph ?
A
A graph drawn in a plane in such a way that any pair of edges meet only at their end
vertices
B A graph drawn in a plane in such a way that if the vertex set of graph can be partitioned
into two non - empty disjoint subset X and Y in such a way that each edge of G has one
end in X and one end in Y.
C A simple graph which is Isomorphic to Hamiltonian graph
D None of these

Answer A

Id 6
Question A path in graph G, which contains every vertex of G once and only once
A
Euler tour
B Hamiltonian Path
C Euler trail
D Hamiltonian tour

Answer B
Id 7
Question A minimal spanning tree of a graph G is.... ?
A
A spanning sub graph
B A tree
C Minimum weights
D All of above
Answer D

Id 8
Question A vertex of a graph is called even or odd depending upon ?
A
Total number of edges in a graph is even or odd
B Total number of vertices in a graph is even or odd
C Its degree is even or odd
D None of these

Answer C

Id 9
Question The degree of any vertex of graph is .... ?
A
The number of edges incident with vertex
B Number of vertex in a graph

C Number of vertices adjacent to that vertex

D Number of edges in a graph

Answer A
Id 10
Question If for some positive integer k, degree of vertex d(v)=k for every vertex v of the graph G,
then G is called... ?
A
K graph
B K-regular graph
C Empty graph
D All of above

Answer B

Id 11
Question A graph with no edges is known as empty graph. Empty graph is also known as... ?
A
Trivial graph

B Regular graph
C Bipartite graph

D None of these

Answer A

Id 12
Question A graph G is called a ..... if it is a connected acyclic graph
A
Cyclic graph
B Regular graph
C Tree
D Not a graph

Answer C
Id 13
Question Eccentricity of a vertex denoted by e(v) is defined by.... ?
A max { d(u,v): u belongs to v, u does not equal to v : where d(u,v) is the distance between
u&v}
B min { d(u,v): u belongs to v, u does not equal to v }

C Both A and B

D None of these
Answer A

Id 14
Question Complete graph has exactly…….number of edges.
A
n
B n(n-1)
C n+2
D n(n-1) ∕ 2
Answer D

Id 15
Question Any graph S is called as spanning sub graph of G if
A
Vertex set of G equal to S
B Vertex set of G not equal to S
C Edge set of G and S are equal
D None of Above

Answer A
Id 16
Question A sub graph of a graph G that contains every vertex of G and is a tree is called
A
Trivial tree
B empty tree
C Spanning tree
D Full tree
Answer C

Id 17
Question In the planar graph, the graph crossing number of edges is
A 0
B 1
C 2
D 3
Answer A

Id 18
Question
Choose one: The degrees of {a, b, c, d, e} in the given graph is

a b

V
d ,c
oe

A
2, 2, 3, 1, 1
B 2, 3, 1, 0, 1
C 0, 1, 2, 2, 0
D 2, 3, 1, 2, 0

Answer D
Id 19
Question Suppose that a connected planar simple graph has 30 edges. If a plane drawing of this
graph has 20 faces, how many vertices does the graph have?
A 15
B 12
C 13
D 14
Answer B

Id 20
Question The number of colors required to properly color the vertices of every planer graph is

A 2
B 3
C 4
D 5
Answer D

Id 21
Question Let G be a simple undirected planar graph on 11 vertices with 15 edges. If G is a
connected graph, then the number of bounded faces in any embedding of G on the plane
is equal to
A 3
B 4
C 5
D 6
Answer D

Id 22
Question A graph with n vertices will definitely have a parallel edge or self loop of the total number
of edges are
A more than n
B more than n+1
C more than (n+1)/2
D more than n(n-1)/2
Answer D
Id 23
Question In an undirected graph the number of nodes with odd degree must be
A Zero
B Odd
C Prime
D Even
Answer D

Id 24
Question Which two of the following are equivalent for an undirected graph G?
(i) G is a tree
(ii) There is at least one path between any two distinct vertices of G
(iii) G contains no cycles and has (n-1) edges
(iv)G has n edges
A (i) and (ii)
B (i) and (iii)
C (i) and (iv)
D (ii) and (iii)
Answer B

Id 25
Question An undirected graph possesses an eulerian circuit if and only if it is connected and its
vertices are

A all of even degree


B all of odd degree
C of any degree
D even in number
Answer A

Id 26
Question Maximum number of edges in a n-Node undirected graph without self loop is
A n2
B n(n – 1)
C n(n + 1)
D n(n – 1)/2
Answer D
Id 27
Question In a graph if e=[u, v], Then u and v are called

A Endpoints of e
B Adjacent nodes
C Neighbors
D All of above
Answer D

Id 28
Question The maximum degree of any vertex in a simple graph with n vertices is

A n–1
B n+1
C 2n–1
D n
Answer A

Id 29
Question Which of the following statement is true

A Every graph is not its own subgraph


B The terminal vertex of a graph are of degree two.
C A tree with n vertices has n edges.
D A single vertex in graph G is a subgraph of G.
Answer D

Id 30
Question G1 and G2 are two graphs as shown :

d e f
A Both G1 and G2 are planar graphs
B Both G1 and G2 are not planar graphs.
C G1 is planar and G2 is not planar graph.
D G1 is not planar and G2 is planar graph.
Answer D

Id 31
Question In any undirected graph the sum of degrees of all the nodes
A Must be even
B Are twice the number of edges
C Must be odd
D Need not be even
Answer B

Id 32
Question The complete graph with four vertices has k edges where k is
A 3
B 4
C 5
D 6
Answer D

Id 33
Question The number of edges in K10 is
A 40
B 42
C 44
D None
Answer D

Id 34
Question Consider the graph given below
A A B C D
A 1 1 1 1
B 1 1 1 1
C 0 0 0 1
D 0 0 0 0
B A B C D
A 0 1 0 0
B 1 0 0 0
C 0 0 0 1
D 0 0 0 0
C A B C D
A 0 1 0 1
B 1 1 0 1
C 0 0 0 1
D 0 0 0 0
D A B C D
A 0 1 0 0
B 1 0 1 0
C 0 0 0 1
D 0 0 0 0
Answer D

Id 35
Question A vertex of degree zero in a graph is called

A Pendant vertex
B isolated vertex
C adjacent vertex
D none of these
Answer B

Id 36
Question Consider the graph G shown below
Then G is a

A Complete graph
B Regular graph
C Complete bipartite graph
D Null graph
Answer C

Id 37
Question The number of edges, the complete graph K5 has
A 5
B 6
C 9
D 10
Answer D

Id 38
Question Consider the graph G and its subgraphs G1 and G2

GI

Then G1 and G2 are


A Vertex disjoint subgraphs
B regular subgraphs
C spanning subgraphs
D None of these
Answer A

Id 39
Question If H is a spanning subgraph of graph G such that degree of each vertex of H is K, then H
is called
A K-factor graph of G
B null subgraph of G
C complement of graph G
D none of these
Answer A

Id 40
Question The Complete bipartite graph K2,3 has
A Eulerian circuit
B Hamiltonian circuit
C Both Eulerian and Hamiltonian circuit
D Neither Eulerian and Hamiltonian circuit
Answer D
Id 41
Question Consider the following graph. It has
a
_------ ·-----_

b ,c

A Eulerian circuit
B Hamiltonian circuit
C Both Eulerian and Hamiltonian circuit
D Neither Eulerian and Hamiltonian circuit
Answer B

Id 42
Question The number of regions defined by connected planar graph with 6 vertices and 10 edges is
A 6
B 7
C 5
D 4
Answer A

Id 43
Question The minimum number of colors needed to produce a proper coloring of simple connected
graph G is called
A Edge connectivity of G
B Chromatic number of G
C Vertex connectivity of G
D None of these
Answer B

Id 44
Question The chromatic number of the complete graph Kn on the vertices is
A (n-1)
B (n + 1)
C n
D n-2
Answer C

Id 45
Question Give the bipartite partitioning of the given graph
2 3

1/ ~ 4

M
~ / 5
7 6

A X={1, 3, 5, 7 }, Y= {2, 4, 6, 8 }
B X={1, 2, 3, 4 }, Y= {5, 6, 7, 8 }
C X={2, 3 }, Y= {1, 4, 5, 6 }
D None of these
Answer A
Id 46
Question Which of the following is not bipartite graph?

( a) (h) (r.) {d)

A a
B b
C c
D d
Answer B

Id 47
Question Find the complement of the following graph

v4 vS
A

v4 v5

v4 v5

v4 vS
D None
Answer C

Id 48
Question Find the graph that has Hamiltonian circuit
a.

C h

e d g

A G1 and not G2
B Nether G1 and G2
C G2 and not G1
D Both G1 and G2
Answer D

Id 49
Question Two graphs G1 and G2 are isomorphic if__________________
A Number of vertices and edges in G1 and G2 are same
B G1 has n vertices of degree k then G2 must have exactly n vertices of degree k
C Adjacency is preserved
D All of these
Answer D

Id 50
Question A subgraph G’ of G is known as spanning subgraph if________
A G’ contains all the edges of G
B G’ contains all the vertices of G
C Both (a) and (b)
D None of these
Answer B

Id 51
Question A graph with n vertices is complete graph if _________
A Degree of each vertex is n
B Degree of each vertex is (n- 1)
C Degree of each vertex is (n + 1)
D Degree of each vertex is 2n
Answer B

Id 52
Question Find out self complementary graph from the following options
A

B

C
0
D
z
None of these
Answer C

Id 53
Question Find the complement of the following graph
b

a e c

d
B b

C IJ

D None

Answer B

Id 54
Question Consider the graph given below
a

d e

A It contains Euler circuit


B It contains euler path
C It does not have Hamiltonian cycle
D All of these
Answer D
Marks 2
Unit 4
Id 55
Question Find the number of edges in a graph with 6 nodes, 2 of degree 4 and 4 of degree 2.
A 12
B 12
C 8
D None of these
Answer C

Id 56
Question Select the strongly connected graph

G2
A Only G1
B Only G2
C Both G1 and G2
D None of these
Answer B

Id 57
Question Sum of the degree of all vertices in the following graph is …….

e
,c ,d

A 11
B 10
C 13
D None
Answer B

Id 58
Question The matrix representation of the graph in fig is
A a b c d
a 0 1 1 1
b 1 1 1 1
c 2 1 0 1
d 1 1 1 1
B a b c d
a 0 1 2 1
b 1 1 1 1
c 2 1 0 1
d 1 0 1 1
C a b c d
a 0 1 2 1
b 1 1 1 0
c 2 1 0 1
d 1 0 1 1
D None of these
Answer C

Id 59
Question If no self loop and no parallel edges are present in a graph, the graph is known as
A Multigraph
B Pseudograph
C Simple graph
D None of these
Answer C

Id 60
Question A proper coloring of graph G is an assignment of colors to its vertices so that
A Two adjacent vertices have the same color
B No two adjacent vertices have the same color
C All the vertices have same color
D None of these
Answer B

Id 61
Question How many edges the planar graph have if it has 7 regions and 5 nodes.
A 8
B 7
C 10
D 6
Answer C

Id 62
Question A graph is said to be self complementary if
A It is simple graph
B It is a bipartite graph
C It is isomorphic to its complement
D It is a complete graph
Answer C

Id 63
Question If the degree of each vertex is same in any graph G, then the graph G is called as
A Simple graph
B Complete graph
C Regular graph
D Null graph
Answer C

Id 64
Question In the following graph, the parallel edges are

e4

A e1, e2
B e2,e3
C e3, e5
D e3,e4
Answer D

Id 65
Question In the following graph, the adjacent edges are

e4

A e1, e3
B e2,e5
C e1,e4
D None of these
Answer B

Id 66
Question The directed graph is shown below. The indegree of the vertex v1 is

A 1
B 2
C 3
D 4
Answer C

Id 67
Question The number of nodes required to construct a graph with exactly 6 edges in which each
node is of degree 2 is
A 5
B 8
C 6
D 4
Answer C

Id 68
Question Consider the following graph G and its subgraph G1 and G2

a b a.
a

,d
7Gl
,c
d

G2
,c

G
A Vertex disjoint subgraphs
B Edge disjoint subgraphs
C Spanning subgraphs
D None of these
Answer B

Id 69
Question Consider the following graph, the vertex connectivity of the graph is

v2

v3
A 1
B 3
C 2
D 4
Answer C

Id 70
Question Consider the following graph, the edge connectivity of the graph is
v2

v4 v3
A 3
B 2
C 1
D 4
Answer A

Id 71
Question The chromatic number of complete bipartite graph Km,n is
A m
B n
C 2
D 1
Answer C

Id 72
Question The number of edges in complete bipartite graph having 10 and 12 vertices are________
A 22
B 120
C 2
D None
Answer B

Id 73
Question Find the intersection of the following two graphs G1 and G2
vl

11/
v3 v2
G2

A vl

v2 v3
B vl

C
v2
A v3

v2 v3

D None of these
Answer B

Id 74
Question The complement of Km,n will consist of ______________ connected components
A 1
B 2
C 3
D n
Answer B

Id 75
Question A Eulerian circuit passes through
A Every edge exactly once
B Every vertex exactly once with the first and the last vertex same
C Both (a) and (b)
D None of these
Answer A

Id 76
Question A Hamiltonian circuit passes through
A Every edge exactly once
B Every vertex exactly once with the first and the last vertex same
C Both (a) and (b)
D None of these
Answer B

Id 77
Question If self-loops as well as parallel edges are allowed, the graph is known as ____.
A multigraph
B pseudograph

C simple graph
D none of these
Answer B

Id 78
Question If no self-loop and no parallel edges are present in a graph, the graph is known as ___ .
A multigraph

B pseudograph
C simple graph
D none of these
Answer C
Id 79
Question How many nodes are necessary to construct a graph with exactly 8 edges in which each
node is of degree 2?

A 2

B 4

C 8
D 16
Answer C

Id 80
Question A directed graph, e is an edge from a to b then _____.

A
a is known as initial vertex and b is not a terminal vertex

B
a is not initial vertex and b is a terminal vertex.

C
a is not initial vertex and b is not a terminal vertex

D
a is initial vertex and b is a terminal vertex.

Answer D

Id 81
Question No. of edges in a complete graph Kn is ____.

A n

B n
2

C n(n - 1) / 2
D n(n + 1) /2
Answer C

Id 82
Question Which is true?

A complete graph <=> regular graph

B complete graph => regular graph but converse need not be true

C regular graph => complete graph but converse need not be true

D none of these

Answer B

Id 83
Question A complete bipartite graph Km, n is regular if____.
A
m>n

B
m<n

C
m=n

D
None of these

Answer C
Id 84
Question How many edges K6 (complete graph with 6 vertices) has?
A
30

B
15

C
6

D
21

Answer B

Id 85
Question How many edges K4,6 has ?

A 24

B 10

C 12

D 15

Answer A

Id 86
Question Which graph is complete bipartite graph but not a regular graph ?

A K3,3
B K4,4
C K1,6
D none of these
Answer C

Id 87
Question A vertex with degree one is known as __.

A Pendant vertex
B isolated vertex

C node
D junction
Answer A

Id 88
Question A graph is known as null graph if__.

A it has no edges
B it has no vertices

C it has no edges and no vertices


D none of these
Answer A

Id 89
Question A graph with 4 nodes and 7 edges can not be a__.

A multigraph
B pseudograph

C simple graph
D all of these
Answer C

Id 90
Question Under which condition Km,n , the complete bipartite graph will have an Eulerian circuit ?

A If m = n and both are odd


B If m != n and either m is odd or n is odd

C If both m and n are even (m = n or m != n)


D none of these
Answer C

Id 91
Question How many Hamiltonian circuits exists in Kn ?

A N
B n-1
C n(n - 1) / 2
D (n - 1)! / 2
Answer D

Id 92
Question If v, e and r are the total number of vertices, edges and regions in the graph, then for any
aph, which condition is satisfied?

A v+e+r=2
B v-e+r=2
C v+e-r=2
D v-e-r=2
Answer B

Id 93
Question which graphs are non planar graphs?

A K5

B K3,3

C both (a) and (b)


D none of these
Answer C

Id 94
Question If parallel edges are allowed but self loops are not permitted, the graph is known as ___.

A
multigraph

B
pseudograph

C
simple graph

D
none of these

Answer A

Id 95
Question The sum of the degrees of the vertices of the graph is___.

A
same as no. of edge
B
twice the no. of edges

C
half the no. of edges

D
none of these

Answer B

Id 96
Question Maximum number of edges in a simple graph with n vertices is__.

A n(n+1) / 2

B n

C 2n

D n(n-1)/2

Answer D

Id 97
Question A complete bipartite graph Km,n is regular if____.

A m>n
B m<n

C m=n
D none of these
Answer C

Id 98
Question Which one of the following is the example of non linear data structure
A Graph

B Binary Tree

C Queue

D Link List

Answer A

Id 99
Question Let A be an adjacency matrix of a graph G. The ij th entry in the matrix AK , gives

A The number of paths of length K from vertex Vi to vertex Vj.

B Shortest path of K edges from vertex Vi to vertex Vj.

C Length of a Eulerian path from vertex Vi to vertex Vj.

D Length of a Hamiltonian cycle from vertex Vi to vertex Vj.

Answer B

Id 100
Question An undirected graph G with n vertices and e edges is represented by adjacency list. What
is the time required to generate all the connected components?
A O (n)

B O (e)

C O (e+n)

D O (e2 )

Answer C
Id 101
Question An adjacency matrix representation of a graph cannot contain information of :

A nodes
B edges
C direction of edges
D parallel edges
Answer D

Marks 1
Unit 4

Id 102
Question In handshaking lemma the sum of the degrees of the vertices of a graph is
_____________the number of edges
A Twice

B Thrice

C Equal

D None of these

Answer A
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Fi
rstst
epi
npr
ocessofpr
obl
em sol
vi
ngi
sto_
___
___
_.
N))
((
OPTI
ON_ Desi
gnasol
uti
on
A))
((
OPTI
ON_ Def
ineapr
obl
em
B))
((
OPTI
ON_ Under
standi
ngofpr
obl
em
C))
((
OPTI
ON_ Sol
vi
ngt
hepr
obl
em
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA Problem Sol
vi
ngsteps:1)Identi
fy/
Defineaproblem
TION)
) 2)Understandtheproblem 3)I
ndenti
fyalt
ernat
eway s
(OPTI
ONAL tosolveprobl
em 4)Selectthebestway5)Listoutthe
) i
nstructi
onsforbestway6)Ev al
uatethebestsolut
ion

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whendet ermini
ngtheeffi
ciencyofal
gor
it
hm,
the
N)) spacefactorismeasuredby
____
___
_ _
_ __
____
_____
____.
((
OPTI
ON_ Count
ingthemaxi
mum memor
yneededbyt
he
A)) al
gori
thm
((
OPTI
ON_ Count
ingthemi
nimum memor
yneededbyt
he
B)) al
gori
thm
((
OPTI
ON_ Count
ingtheav
eragememor
yneededbyt
he
C)) al
gori
thm
((
OPTI
ON_ Count
ingthemaxi
mum di
skspaceneededbyt
he
D)) al
gori
thm
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Thecomplexi
tyofBi
nar
ysear
chal
gor
it
hm
N)) i
s___
____
___.
((
OPTI
ON_ O(
n)
A))
((
OPTI
ON_ O(
logn)
B))
((
OPTI
ON_ O(
n.l
ogn)
C))
((
OPTI n2)
ON_ O(
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whichofthefol
l
owi
ngi
snott
hepar
tofADT
N)) descr
ipt
ion?
((
OPTI
ON_ Dat
a
A))
((
OPTI
ON_ Oper
ati
ons
B))
((
OPTI
ON_ Bot
hDat
aandOper
ati
ons
C))
((
OPTI
ON_ Noneoft
heabov
e
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA AnADTconsistsof
TION)
) Decl
arat
ionofdata,
(OPTI
ONAL
) Decl
arat
ionofoperat
ions

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Analgor
it
hm t
hatcal
l
sit
sel
fdi
rect
lyori
ndi
rect
lyi
s
N)) knownas
((
OPTI
ON_ Recur
sion
A))
((
OPTI
ON_ Tr
aver
sal
B))
((
OPTI
ON_ Sear
chi
ng
C))
((
OPTI
ON_ Pol
i
shNot
ati
on
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whichofthefoll
owi
ngdat
ast
ructur
ecan'
tst
oret
he
N)) non-homogeneousdat
ael
ements?
((
OPTI
ON_ Recor
ds
A))
((
OPTI
ON_ Ar
ray
B))
((
OPTI
ON_ Poi
nter
s
C))
((
OPTI
ON_ Al
loft
hese
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA Arrayi
scol
l
ect
ionofsi
mil
ar(
homogeneous)dat
a
TION)
) ty
pes
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Anal
gor
it
hm i
s__
___
___
___
___
___
___
_.
N))
((
OPTI
ON_ api
eceofcodet
obeexecut
ed.
A))
((
OPTI
ON_ ast
epbyst
eppr
ocedur
etosol
vepr
obl
em.
B))
((
OPTI
ON_ al
oosel
ywr
it
tencodet
omakef
inal
code.
C))
((
OPTI
ON_ Al
loft
hese
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whi
chofthef
oll
owi
ngasy
mpt
oti
cnot
ati
oni
sthe
N)) wor
stamongall
?
((
OPTI
ON_ Ο(
n+9378)
A))
((
OPTI
ON_ n3)
Ο(
B))
((
OPTI
ON_ O(
logn)
C))
((
OPTI
ON_ O(
nlogn)
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whi
choneofthefol
l
owingal
gori
thmicappr
oacht
ri
es
N)) t
oachi
evel
ocali
zedopt
imum sol
uti
on?
((
OPTI
ON_ Gr
eedyAppr
oach
A))
((
OPTI
ON_ Di
vi
deandConquerAppr
oach
B))
((
OPTI
ON_ Dy
nami
cAppr
oach
C))
((
OPTI
ON_ Tr
ial
andEr
rorAppr
oach
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA Greedyappr
oachf
ocusesonl
yonl
ocal
i
zedopt
imum
TION)
) solut
ion.
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Twomai
nmeasur
esfort
heef
fi
ciencyofanal
gor
it
hm
N)) ar
e__
___
___
___
___
_.
((
OPTI
ON_ Pr
ocessorandMemor
y
A))
((
OPTI
ON_ Compl
exi
tyandCapaci
ty
B))
((
OPTI
ON_ Dat
aandSpace
C))
((
OPTI
ON_ Ti
meandSpace
D))
(
(CORRECT D
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Thet
imefact
orwhendet
ermini
ngtheeff
ici
encyof
N)) al
gor
it
hm i
smeasuredby
____
_ _
___
____
.
((
OPTI
ON_ Count
ingmi
croseconds
A))
(
(OPTI
ON_ Count
ingspacei
nKBofanal
gor
it
hm
B)
)
((
OPTI
ON_ Count
ingt
henumberofst
atement
C))
((
OPTI
ON_ Count
ingnumberofkeyoper
ati
ons
D))
(
(CORRECT D
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whichofthefol
l
owingcasedoesnotexi
sti
n
N)) complexi
tyt
heory?
((
OPTI
ON_ BestCase
A))
((
OPTI
ON_ Av
erageCase
B))
((
OPTI
ON_ Bel
owAv
erageCase
C))
((
OPTI
ON_ Wor
stCase
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(
OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Ti
mecompl
exi
tyofanal
gor
it
hm dependsupon_
___
_
N)) .
((
OPTI
ON_ Si
zeofi
nput
A))
((
OPTI
ON_ SpeedofComput
er
B))
((
OPTI
ON_ Fr
equencyCount
C))
((
OPTI
ON_ Bot
hAandB
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Bi
g-Ohi
s__
___
___
___
___
___
__.
N))
((
OPTI
ON_ Asy
mpt
oti
cLowerBound
A))
((
OPTI
ON_ Fr
equencyCount
B))
((
OPTI
ON_ Asy
mpt
oti
cUpperBound
C))
((
OPTI
ON_ Rat
eofgr
owt
hofaf
unct
ion
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Bi
g-Omegai
s__
___
___
___
___
___
__.
N))
((
OPTI
ON_ Asy
mpt
oti
cLowerBound
A))
((
OPTI
ON_ Fr
equencyCount
B))
((
OPTI
ON_ Asy
mpt
oti
cUpperBound
C))
((
OPTI
ON_ Rat
eofgr
owt
hofaf
unct
ion
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whichoneoft hef
oll
owi
ngi
snotanal
gor
it
hm’
s
N)) charact
eri
sti
c?
((
OPTI
ON_ I
nput
A))
((
OPTI
ON_ Out
put
B))
((
OPTI
ON_ I
nfi
nit
eness
C))
((
OPTI
ON_ Unambi
guous
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whi
chst
atementi
sfal
se?
N))
((
OPTI
ON_ Pseudocodei
sver
ysi
mil
art
oal
gor
it
hms.
A))
((
OPTI
ON_ Pseudocodeusual
l
yincl
udessomesy
ntaxoft
he
B)) l
anguage.
((
OPTI
ON_ Pseudocodescanbecompi
l
ed.
C))
((
OPTI
ON_ Pseudocodei
sthecombi
nati
onofEngl
ish
D)) st
atementswit
hprogr
ammingmethodology
.
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA Pseudocodescannotbecompiled.As,pseudocode
TION)
) general
l
ydoesnotactual
lyobeythesyntaxrul
esof
(OPTI
ONAL anyparti
cul
arl
anguage.
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Aflowchar
tisadiagr
ammat
icr
epr
esent
ati
onofan
N)) __
__ _
___
____
___.
((
OPTI
ON_ Dat
aty
pes
A))
((
OPTI
ON_ Al
gor
it
hms
B))
((
OPTI
ON_ Dat
aSt
ruct
ures
C))
((
OPTI
ON_ Al
loft
hese
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O I
nfl
owchart‘
Rect
angl
e’i
susedt
orepr
esent
N)) _
___
___
___
_____
.
((
OPTI
ON_ Deci
sion
A))
((
OPTI
ON_ Pr
ocessi
ng
B))
((
OPTI
ON_ I
nput
C))
((
OPTI
ON_ St
art
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O I
nfl
owchart‘
Diamond’
isusedt
orepr
esent
N)) _
___
___
___
_____
.
((
OPTI
ON_ Deci
sion
A))
((
OPTI
ON_ Pr
ocessi
ng
B))
((
OPTI
ON_ I
nput
C))
(
(OPTI
ON_ St
art
D)
)
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O I
nfl
owchart‘
Hexagon’
isusedt
orepr
esent
N)) _
___
___
___
_____
.
((
OPTI
ON_ Deci
sion
A))
((
OPTI
ON_ Pr
ocessi
ng
B))
((
OPTI
ON_ I
nputandOut
put
C))
((
OPTI
ON_ I
nit
ial
i
zat
in/
Prepar
ati
on
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O I
nfl
owchart‘
paral
l
elogr
am’
isusedt
orepr
esent
N)) _
___
___
___
_____
.
((
OPTI
ON_ Deci
sion
A))
((
OPTI
ON_ Pr
ocessi
ng
B))
((
OPTI
ON_ I
nputandOut
put
C))
((
OPTI
ON_ St
art
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O ____
_____
____
______
_ _
_ofanal
gor
it
hm i
sdef
inedas
N)) thetot
alti
mer equi
redbyt
heal
gor
it
hm t
orunto
completi
on.
((
OPTI
ON_ SpaceCompl
exi
ty
A))
((
OPTI
ON_ Ti
meCompl
exi
ty
B))
((
OPTI
ON_ Anal
ysi
s
C))
((
OPTI
ON_ Asy
mpt
oti
cAnal
ysi
s
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O _____
____
___
_ _
___
___
_ofanalgor
it
hm istotal
space
N)) requi
redbytheal
gori
thm wi
thr
especttotheinput
size.
((
OPTI
ON_ SpaceCompl
exi
ty
A))
((
OPTI
ON_ Ti
meCompl
exi
ty
B))
((
OPTI
ON_ Memor
yAl
l
ocat
ion
C))
((
OPTI
ON_ Asy
mpt
oti
cAnal
ysi
s
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Thefuncti
onf(n)is___
_ _
___
___ofg(n)if
fther
eexist
s
N)) apositi
verealconst
antcandaposi ti
veint
egern0
suchthatf(
n)≤c.g(n)foral
ln>n0.Thisisdenot
edas
f(
n)=O( g(
n)).
((
OPTI
ON_ Bi
gO
A))
((
OPTI
ON_ Bi
gOmega
B))
((
OPTI
ON_ Bi
gThet
a
C))
((
OPTI
ON_ Noneoft
hese
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Thefuncti
onf(n)is_____
____
__ofg(n)if
fther
eexist
s
N)) apositi
verealconstantcandapositi
veint
egern0
suchthatf(
n)≥c. g(
n)foral
ln>n0.Thisisdenot
edas
f(
n)=O( g(
n)).
((
OPTI
ON_ Bi
gO
A))
((
OPTI
ON_ Bi
gOmega
B))
((
OPTI
ON_ Bi
gThet
a
C))
((
OPTI
ON_ Noneoft
hese
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O I
nworstcaseanaly
sisofanalgor
it
hm,
___
___
___
___
__
N)) ofanal
gori
thm i
scalcul
ated.
((
OPTI
ON_ Bi
gO
A))
((
OPTI
ON_ Bi
gOmega
B))
((
OPTI
ON_ Bi
gThet
a
C))
((
OPTI
ON_ Noneoft
hese
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O I
nbestcaseanal
ysi
sofanalgor
it
hm,
___
___
___
___
__
N)) ofanal
gori
thm i
scal
cul
ated.
((
OPTI
ON_ Bi
gO
A))
((
OPTI
ON_ Bi
gOmega
B))
((
OPTI
ON_ Bi
gThet
a
C))
((
OPTI
ON_ Noneoft
hese
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whi
choneoft
hef
oll
owi
ngi
snotabui
l
t-i
ndat
aty
pe?
N))
((
OPTI
ON_ I
nteger
A))
((
OPTI
ON_ Bool
ean
B))
((
OPTI
ON_ St
ruct
ure
C))
((
OPTI
ON_ Char
act
er
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whi
choneoft
hef
oll
owi
ngi
snotader
iveddat
aty
pe?
N))
((
OPTI
ON_ I
nteger
A))
((
OPTI
ON_ St
ruct
ure
B))
((
OPTI
ON_ Char
act
er
C))
((
OPTI
ON_ Bot
hAandC
D))
(
(CORRECT D
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)
) 1
(
1/2/
3..
.)
(
(QUESTI
O Whi
choneoft
hef
oll
owi
ngi
sder
iveddat
aty
pe?
N))
((
OPTI
ON_ I
nteger
A))
((
OPTI
ON_ Uni
on
B))
((
OPTI
ON_ Char
act
er
C))
((
OPTI
ON_ Bool
ean
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O __
___
_ _
___
_____i
sawaytoorganizeddat
ainsucha
N)) waythati
tcanbeusedef
fi
cient
ly.
((
OPTI
ON_ Dat
aSt
ruct
ure
A))
((
OPTI
ON_ Dat
aTy
pe
B))
((
OPTI
ON_ Dat
aSet
C))
((
OPTI
ON_ Al
loft
heabov
e
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O ___
______
_ _
____isdef
inedasadatadecl
arat
ion
N)) packagedtogetherwi
ththeoper
ati
onsthatare
meaningfulfort
hedatatype.
((
OPTI
ON_ Pseudocode
A))
((
OPTI
ON_ Dat
ast
ruct
ure
B))
((
OPTI
ON_ Dat
aSet
C))
((
OPTI
ON_ Abst
ractdat
aty
pe
D))
(
(CORRECT D
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whichoneoft
hef
oll
owi
ngi
snott
heLi
nearDat
a
N)) St
ructur
e?
((
OPTI
ON_ St
ack
A))
((
OPTI
ON_ Tr
ee
B))
((
OPTI
ON_ Queue
C))
((
OPTI
ON_ Li
nkedLi
st
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whichoneoft
hef
oll
owi
ngi
stheSt
ati
cDat
a
N)) St
ructur
e?
((
OPTI
ON_ St
ack
A))
((
OPTI
ON_ Li
nkedLi
st
B))
((
OPTI
ON_ Queue
C))
(
(OPTI
ON_ Ar
ray
D)
)
(
(CORRECT D
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whichoneoft
hef
oll
owi
ngi
snott
heDy
nami
cDat
a
N)) St
ructur
e?
((
OPTI
ON_ St
ack
A))
((
OPTI
ON_ Li
nkedLi
st
B))
((
OPTI
ON_ Ar
ray
C))
((
OPTI
ON_ Queue
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Dy
nami
cdat
ast
ruct
ure_
___
___
___
___
___
__.
N))
((
OPTI
ON_ i
seasyt
opr
ogr
am.
A))
((
OPTI
ON_ hasr
andom access.
B))
((
OPTI
ON_ doesef
fi
cientuseofmemor
y.
C))
((
OPTI
ON_ Noneoft
heabov
e.
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Dat
astruct
urest
hatcanchangesi
zewhi
l
eapr
ogr
am
N)) i
srunni
ngisknownas___
______
___
__
((
OPTI
ON_ St
ati
cDat
aSt
ruct
ure.
A))
((
OPTI
ON_ Dy
nami
cDat
aSt
ruct
ure.
B))
((
OPTI
ON_ Li
nearDat
aSt
ruct
ure.
C))
((
OPTI
ON_ Non-
LinearDat
aSt
ruct
ure
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Gr
aphi
s__
___
___
___dat
ast
ruct
ure.
N))
((
OPTI
ON_ l
i
near
A))
((
OPTI
ON_ non-
li
near
B))
((
OPTI
ON_ per
sist
ent
C))
((
OPTI
ON_ ephemer
al
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Li
sti
s__
___
___
___dat
ast
ruct
ure.
N)
)
((
OPTI
ON_ st
ati
c
A))
((
OPTI
ON_ dy
nami
c
B))
((
OPTI
ON_ per
sist
ent
C))
((
OPTI
ON_ ephemer
al
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whichoneoft
hef
oll
owi
ngi
snotaal
gor
it
hm desi
gn
N)) st
rategy
?
((
OPTI
ON_ Recur
siv
e
A))
((
OPTI
ON_ Non-
li
near
B))
((
OPTI
ON_ Backt
racki
ng
C))
((
OPTI
ON_ Dy
nami
cPr
ogr
ammi
ng
D))
(
(CORRECT B
_
CHOICE))
(
A/B/
C/D)
((
EXPLANA Non-
li
neari
sat
ypeofdat
ast
ruct
ures
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whi
choneoft
hef
oll
owi
ngi
snotanal
gor
it
hm desi
gn
N)) t
ool
?
((
OPTI
ON_ Pseudocode
A))
((
OPTI
ON_ Fl
owchar
t
B))
((
OPTI
ON_ Di
vi
deandConquer
C))
((
OPTI
ON_ Onl
yAandB
D))
(
(CORRECT D
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA Di
vi
deandConqueri
sal
gor
it
hm desi
gnt
ool
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Bi
gOnot
ati
oni
sdef
inedf
or_
___
___
___
___.
N))
((
OPTI
ON_ Ti
meandSpaceCompl
exi
ty
A))
((
OPTI
ON_ Opt
imal
i
ty
B))
((
OPTI
ON_ Sear
chi
ng
C))
((
OPTI
ON_ Noneoft
heabov
e
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whati
sti
mecompl exi
tyofbinar
ysear
chwhi
chuses
N)) di
vi
deandconquerstr
ategy
?
((
OPTI
ON_ O(
n.l
og(
n))
A))
((
OPTI
ON_ O(
log(
n))
B))
((
OPTI
ON_ O(
n)
C))
((
OPTI n2)
ON_ O(
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whati
sti
mecompl exi
tyofmer
gesor
twhi
chuses
N)) di
vi
deandconquerstr
ategy
?
((
OPTI
ON_ O(
n.l
og(
n))
A))
((
OPTI
ON_ O(
log(
n))
B))
((
OPTI
ON_ O(
n)
C))
((
OPTI n2)
ON_ O(
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whatisti
mecompl
exi
tyoff
un(
)?
N)) i
ntfun(
intn)
{
i
ntcount=0;
f
or( i
nti=n;i>0;
i/=2)
for(i
ntj=0;j<i
;j++)
count+=1;
r
eturncount;
}
((
OPTI
ON_ O(
n.l
og(
n))
A))
((
OPTI
ON_ O(
log(
n))
B))
((
OPTI
ON_ O(
n.n)
C))
((
OPTI
ON_ O(
log(
n).
log(
n))
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA Thetimecompl exit
ycanbecal culatedbycounti
ng
TION)
) numberoft i
mestheexpressi
on" count=count+1;"i
s
(OPTI
ONAL executed.Theexpressi
onisexecut ed0+1+2+3+4
) +...
.+( n-
1)times.Ti
mecompl exity=Thet a(0+1+2
+3+. .+n- 1)=Theta(n*
(n-1)
/2)=Thet a(n^2)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whatdoesitmeanwhenwesaythatanal
gor
it
hm Xi
s
N)) asy
mptoti
call
ymoreeff
ici
entt
hanY?
(( ON_ Xwi
OPTI l
lbeabet
terchoi
cef
oral
li
nput
s
A))
(( ON_ Ywi
OPTI l
lbeabet
terchoi
cef
orsmal
li
nput
s
B))

(( ON_ Xwi
OPTI l
lbeabet
terchoi
cef
oral
li
nput
sexceptl
arge
C)) i
nput
s

((
OPTI
ON_ Xwillbeabet
terchoi
cef
oral
li
nput
sexceptsmal
l
D)) i
nput
s
(
(CORRECT D
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON Newdataaretobeinser
tedint
oadatastr
uct
ure,
but
)
) ther
eisnoavai
labl
espace;t
hissi
tuat
ioni
susual
l
y
call
ed__
___
_____.
(
(OPTI A Sat
ON_ urat
ion
)
)
(
(OPTI
ON_
B Ov
erf
low
)
)
(
(OPTI C Under
ON_ fl
ow
)
)
(
(OPTI D Housef
ON_ ull
)
)
(
(CORRECT_ B
CHOICE))
(A/
B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON Whichofthef
oll
owingsor
ti
ngal
gor
it
hm i
sofdi
vi
de-
)
) and-
conquert
ype?
(
(OPTI A I
ON_ nser
ti
onSor
t
)
)
(
(OPTI
ON_
B Bubbl
eSor
t
)
)
(
(OPTI C Qui
ON_ ckSor
t
)
)
(
(OPTI D Pr
ON_ im’
sAl
gor
it
hm
)
)
((CORRECT_ C
CHOICE))
(A/B/C/
D)
((
EXPLANA
TION)
)
(OPTI
ONAL)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON ExpandADT_
___
___
___
___
_
)
)
(
(OPTI A Abst
ON_ ractDat
aTy
pe
)
)
(
(OPTI
ON_
B Aut
omat
icDat
aTr
ansact
ion
)
)
(
(OPTI C AccessDat
ON_ aTy
pe
)
)
(
(OPTI D Abst
ON_ ractDat
aTr
ansmi
ssi
on
)
)
((CORRECT_ A
CHOICE))
(A/B/C/
D)
((
EXPLANA
TION)
)
(OPTI
ONAL)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON Whi
choft
hef
oll
owi
ngdoesnotbel
ongt
orecur
sion?
)
)
(
(OPTI A Fi
ON_ bonacci
Sequence
)
)
(
(OPTI
ON_
B Queue
)
)
(
(OPTI C TowerofHanoi
ON_
)
)
(
(OPTI D Fact
ON_ ori
alFunct
ion
)
)
((CORRECT_ C
CHOICE))
(A/B/C/
D)
(
(EXPLANA
TION)
)
(OPTI
ONAL)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON Thequicksor
tal
gor
it
hm expl
oit_
___
___
__desi
gn
)
) techni
que.
(
(OPTI A Gr
ON_ eedy
)
)
(
(OPTI
ON_
B Dy
nami
cPr
ogr
ammi
ng
)
)
(
(OPTI C Backt
ON_ racki
ng
)
)
(
(OPTI D Di
ON_ vi
deandConquer
)
)
((CORRECT_ D
CHOICE))
(A/B/C/
D)
((
EXPLANA
TION)
)
(OPTI
ONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whichoft
hegiv
enopti
onsprovi
desthei
ncreasi
ng
N)) or
derofasympt
oti
ccomplexi
tyoff
uncti
onsf1,f
2,f
3
andf 4?
f1(n)=2^n
f2(n)=n^(
3/2)
f3(n)=nLogn
f4(n)=n^(
Logn)

((
OPTI
ON_ f
1,f
2,f
3,f
4
A))
((
OPTI
ON_ f
3,f
2,f
4,f
1
B))
((
OPTI
ON_ f
2,f
3,f
1,f
4
C))
((
OPTI
ON_ f
4,f
1,f
2,f
3
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Whi
ON) chst
atementi
str
ue?

(
(OPTI
ON_
A)) Ifadynamic-
progr
ammi ngpr
oblem sat
isfi
estheopti
mal-
substr
uctur
epropert
y,t
henalocal
lyoptimalsol
uti
onisgl
obal
l
y
opti
mal.
(
(OPTI
ON_
B)) I
fagreedychoi
ceproper
tysat
isf
iestheopt
imal-
subst
ruct
ure
pr
opert
y,t
henalocal
lyopti
malsolut
ioni
sglobal
lyopt
imal
.

(
(OPTI
ON_
C)) Bot
hofabov
e

(
(OPTI
ON_
D)) Noneofabov
e
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Whatal
ON) gor
it
hm t
echni
quei
susedi
nthei
mpl
ement
ati
onofKr
uskal
sol
uti
onfortheMST?

(
(OPTI
ON_
A)) Gr
eedyTechni
que

(
(OPTI
ON_
B)) Di
vi
de-
and-
ConquerTechni
que

(
(OPTI
ON_
C)) Dy
nami
cPr
ogr
ammi
ngTechni
que

(
(OPTI
ON_
D)) Theal
gor
it
hm combi
nesmor
ethanoneoft
heabov
etechni
ques

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Di
ON) j
kst
ra’
sal
gor
it
hm :

(
(OPTI
ON_
A)) Hasgr
eedyappr
oacht
ofi
ndal
lshor
testpat
hs

(
(OPTI
ON_
B)) Hasbot
hgr
eedyandDy
nami
cappr
oacht
ofi
ndal
lshor
testpat
hs

(
(OPTI
ON_
C)) Hasgreedyappr
oacht
ocomput
esi
ngl
esour
ceshor
testpat
hst
o
al
lot
herv er
ti
ces
(
(OPTI
ON_
D)) Hasbothgreedyanddynamicappr
oacht
ocomput
esi
ngl
esour
ce
shor
testpat
hstoallot
herver
ti
ces
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Whi
ON) choft
hef
oll
owi
ngst
andar
dal
gor
it
hmsi
snotaGr
eedy
al
gori
thm?
(
(OPTI
ON_
A)) Qui
ckSor
t

(
(OPTI
ON_
B)) Mi
nimum Spanni
ngTr
ee

(
(OPTI
ON_
C)) Pr
imsAl
gor
it
hm

(
(OPTI
ON_
D)) Huf
fmanCodi
ng

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Qui
ON) ckSor
tal
gor
it
hm i
suseswhi
cht
echni
que

(
(OPTI
ON_
A)) Dy
nami
cPr
ogr
ammi
ng

(
(OPTI
ON_
B)) Di
vi
deandConquer

(
(OPTI
ON_
C)) Backt
racki
ng

(
(OPTI
ON_
D)) Gr
eedyMet
hod

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Mer
ON) geSor
tal
gor
it
hm i
suseswhi
cht
echni
que

(
(OPTI
ON_
A)) Dy
nami
cPr
ogr
ammi
ng

(
(OPTI
ON_
B)) Di
vi
deandConquer

(
(OPTI
ON_
C)) Backt
racki
ng

(
(OPTI
ON_
D)) Gr
eedyMet
hod

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Bi
ON) nar
ySear
chal
gor
it
hm i
suseswhi
cht
echni
que

(
(OPTI
ON_
A)) Dy
nami
cPr
ogr
ammi
ng

(
(OPTI
ON_
B)) Di
vi
deandConquer

(
(OPTI
ON_
C)) Backt
racki
ng

(
(OPTI
ON_
D)) Gr
eedyMet
hod

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)
) 1
(
1/2/
3..
.)

(
(QUESTI ) Qui
ON) ckSor
tal
gor
it
hm i
suseswhi
cht
echni
que

(
(OPTI
ON_
A)) Dy
nami
cPr
ogr
ammi
ng

(
(OPTI
ON_
B)) Di
vi
deandConquer

(
(OPTI
ON_
C)) Backt
racki
ng

(
(OPTI
ON_
D)) Gr
eedyMet
hod

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Mi
ON) nimum Spanni
ngTr
eei
suseswhi
cht
echni
que

(
(OPTI
ON_
A)) Dy
nami
cPr
ogr
ammi
ng

(
(OPTI
ON_
B)) Di
vi
deandConquer

(
(OPTI
ON_
C)) Backt
racki
ng

(
(OPTI
ON_
D)) Gr
eedyMet
hod

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Huf
ON) fmanCodi
ngi
suseswhi
cht
echni
que

(
(OPTI
ON_
A)) Dy
nami
cPr
ogr
ammi
ng

(
(OPTI
ON_
B)) Di
vi
deandConquer

(
(OPTI
ON_
C)) Backt
racki
ng

(
(OPTI
ON_
D)) Gr
eedyMet
hod

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Pr
ON) imsAl
gor
it
hm i
suseswhi
cht
echni
que

(
(OPTI
ON_
A)) Dy
nami
cPr
ogr
ammi
ng

(
(OPTI
ON_
B)) Di
vi
deandConquer

(
(OPTI
ON_
C)) Backt
racki
ng

(
(OPTI
ON_
D)) Gr
eedyMet
hod

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Di
ON) j
kst
ra’
sAl
gor
it
hmi
suseswhi
cht
echni
que

(
(OPTI
ON_
A)) Dy
nami
cPr
ogr
ammi
ng

(
(OPTI
ON_
B)) Di
vi
deandConquer

(
(OPTI
ON_
C)) Backt
racki
ng

(
(OPTI
ON_
D)) Gr
eedyMet
hod

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Anopt
ON) imi
zat
ionpr
obl
em i
sonei
nwhi
chy
ouwantt
ofi
nd,

(
(OPTI
ON_
A)) Notasol
uti
on

(
(OPTI
ON_
B)) Anal
gor
it
hm

(
(OPTI
ON_
C)) Goodsol
uti
on

(
(OPTI
ON_
D)) Thebestsol
uti
on

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) TheHuf
ON) fmanal
gor
it
hm f
indsa(
n)_
___
___
___
___sol
uti
on.
(
(OPTI
ON_
A)) Opt
imal

(
(OPTI
ON_
B)) Non-
opt
imal

(
(OPTI
ON_
C)) Exponent
ial

(
(OPTI
ON_
D)) Pol
ynomi
al

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Recur
ON) rencesar
eusef
ulf
oranal
ysi
ng

(
(OPTI
ON_
A)) Par
all
elAl
gor
it
hms&Recur
siv
eAl
gor
it
hms

(
(OPTI
ON_
B)) Recur
siv
eAl
gor
it
hms

(
(OPTI
ON_
C)) Si
mpl
eAl
gor
it
hms

(
(OPTI
ON_
D)) Par
all
elAl
gor
it
hms

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) TheHuf
ON) fmanencodi
ngal
gor
it
hm i
sa

(
(OPTI
ON_
A)) Bot
hDy
nami
candgr
eedyal
gor
it
hm

(
(OPTI
ON_
B)) Bot
hdi
vi
deandconquerandgr
eedyal
gor
it
hm

(
(OPTI
ON_
C)) Gr
eedyal
gor
it
hm.

(
(OPTI
ON_
D)) Dy
nami
cpr
ogr
ammi
ngal
gor
it
hm

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) TheHuf
ON) fmanal
gor
it
hm f
inds

(
(OPTI
ON_
A)) somet
imeopt
imal
somet
imenonopt
imal
sol
uti
on

(
(OPTI
ON_
B)) spacewi
seopt
imal
andt
imewi
senonopt
imal
sol
uti
on

(
(OPTI
ON_
C)) anon-
opt
imal
sol
uti
on

(
(OPTI
ON_
D)) anopt
imal
sol
uti
on

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Recur
ON) siv
eal
gor
it
hmsar
ebasedon
(
(OPTI
ON_
A)) Di
vi
deandconquerappr
oach

(
(OPTI
ON_
B)) Top-
downappr
oach

(
(OPTI
ON_
C)) Bot
tom-
upappr
oach

(
(OPTI
ON_
D)) Hi
erar
chi
cal
appr
oach

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ther
ON) ecur
rencer
elat
ionf
orFi
bonacci
ser
iesi
s

(
(OPTI
ON_
A)) T(
n)=2T(
n–2)+2

(
(OPTI
ON_
B)) T(
n)=T(
n–1)+T(
n-2)

(
(OPTI
ON_
C)) T(
n)=2T(
n/2)+1

(
(OPTI
ON_
D))
T(
n)=2T(
n–1)+1

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ther
ON) ecurr
encerel
ati
oncapt
uri
ngt
heopt
imal
timeoft
heTowerof
Hanoiprobl
em wit
hndiscsi
s
(
(OPTI
ON_
A)) T(
n)=2T(
n–2)+2

(
(OPTI
ON_
B)) T(
n)=2T(
n–1)+n

(
(OPTI
ON_
C)) T(
n)=2T(
n/2)+1

(
(OPTI
ON_
D))
T(
n)=2T(
n–1)+1

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Thedi
ON) videandconquermer
gesor
tal
gor
it
hm’
sti
mecompl
exi
tycan
bedef
inedas
(
(OPTI
ON_
A)) θ(
longn)

(
(OPTI
ON_
B)) θ(
n)

(
(OPTI
ON_
C)) Ω(
nlogn)

(
(OPTI
ON_
D)) θ(
nlogn)

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Kr
ON) uskal
algor
it
hm i
sbasedon_
___
___
___
_met
hod

(
(OPTI
ON_
A)) Di
vi
deandconquermet
hod
(
(OPTI
ON_
B)) Gr
eedymet
hod

(
(OPTI
ON_
C)) Dy
nami
cpr
ogr
ammi
ng

(
(OPTI
ON_
D)) Br
anchandbound

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Themet
ON) hodwhichret
urndi
ff
erentsol
uti
onsf
rom asi
ngl
epoi
nt
,whichis____
____
_
(
(OPTI
ON_A)
) greedyme t
hod

(
(OPTI
ON_
B)) br
anchandbound

(
(OPTI
ON_
C)) dy
nami
cpr
ogr
ammi
ng

(
(OPTI
ON_
D)) di
vi
deandconquer

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) j
ON) obsequenci
ngwi
thdeadl
i
nei
sbasedon_
___
___
___
__met
hod

(
(OPTI
ON_
A)) gr
eedymet
hod

(
(OPTI
ON_
B)) br
anchandbound

(
(OPTI
ON_
C)) dy
nami
cpr
ogr
ammi
ng

(
(OPTI
ON_
D)) di
vi
deandconquer

(
(CORRECT_
C A
HOI
CE))
(
A/B/
C/D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Theopt
ON) imal
mer
gepat
ter
nisbasedon_
___
___
__met
hod

(
(OPTI
ON_
A)) Gr
eedymet
hod

(
(OPTI
ON_
B)) Dy
nami
cpr
ogr
ammi
ng

(
(OPTI
ON_
C)) Knapsackmet
hod

(
(OPTI
ON_
D)) Br
anchandbound

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Anal
ON) gor
it
hm t
hatcal
l
sit
sel
fdi
rect
lyori
ndi
rect
lyi
sknownas

(
(OPTI
ON_
A)) Subal
gor
it
hm

(
(OPTI
ON_
B)) Pol
i
shnot
ati
on

(
(OPTI
ON_
C)) Recur
sion

(
(OPTI
ON_
D)) Tr
aver
sal
algor
it
hm

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Whatal
ON) gori
thm t
echni
quei
susedi
nthei
mpl
ement
ati
onof
Kr
uskal

ssoluti
onfort
heMST?
(
(OPTI
ON_ ) Gr
A) eedyTechni
que

(
(OPTI
ON_
B)) Di
vi
de-
and-
Conquer
Techni
que

(
(OPTI
ON_
C)) Dy
nami
cPr
ogr
ammi
ngTechni
que

(
(OPTI
ON_
D)) Theal
gor
it
hm combi
nesmor
ethanoneoft
heabov
etechni
ques

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Whi
ON) chal
gor
it
hm doesnotusegr
eedyst
rat
egy
?

(
(OPTI
ON_
A)) Mer
geSor
t

(
(OPTI
ON_
B)) Bi
nar
ySear
ch

(
(OPTI
ON_
C)) Qui
cksor
t

(
(OPTI
ON_
D)) Al
loft
heabov
e

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Whi
ON) chal
gor
it
hm doesnotusedi
vi
deandconquerst
rat
egy
?

(
(OPTI
ON_
A)) Mer
geSor
t

(
(OPTI
ON_
B)) Huf
fmancodi
ng
(
(OPTI
ON_
C)) Qui
cksor
t

(
(OPTI
ON_
D)) Al
loft
heabov
e

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Runni
ngt
imef
orf
oll
owi
ngr
ecur
rencer
elat
ion
T(
n)=T(
n/4)
+T(
n/ +n2
2)
(
(OPTI
ON_
A)) θ(
nlog(
n))
2
(
(OPTI
ON_
B)) θ(
(n))

(
(OPTI
ON_
C)) θ(
log(
n))

(
(OPTI
ON_
D)) θ(
n)

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Gi
venafuncti
ontocomput
eonni
nput
s,t
hedi
vi
de-
and-
conquer
st
rat
egyconsi
stsof
:
(
(OPTI
ON_
A)) Divi
dethepr
oblem i
ntotwoormor esmallersubpr
oblems.Thati
s
spli
tt
ingt
heinput
sintokdist
inctsubset
s,1kn, y
iel
dingksub-
probl
ems.

(
(OPTI
ON_
B)) Conquert
hesubpr
obl
emsbysol
vi
ngt
hem r
ecur
siv
ely
.

(
(OPTI
ON_
C)) Combi
net
hesol
uti
onst
othesubpr
obl
emsi
ntot
hesol
uti
onsf
or
t
heor
igi
nal
probl
em.
(
(OPTI
ON_
D)) Al
loft
heabov
e

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whi
chonei
str
ueaboutdi
vi
de-
and-
conquerst
rat
egy
:

(
(OPTI
ON_
A)) Combinethesol
uti
onst
othesubpr
obl
emsi
ntot
hesol
uti
onsf
or
theor
igi
nalpr
obl
em.
(
(OPTI
ON_
B)) Sel
ectsetofi
nputf
rom gi
veni
nputset

(
(OPTI
ON_
C)) Tosol
vet
hepr
obl
em t
akesasequenceofdeci
sion

(
(OPTI
ON_
D)) None

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whi
chonei
snott
rueaboutdi
vi
de-
and-
conquerst
rat
egy
:

(
(OPTI
ON_
A)) Combinethesol
uti
onst
othesubpr
obl
emsi
ntot
hesol
uti
onsf
or
theor
igi
nalpr
obl
em.
(
(OPTI
ON_
B)) Sel
ectsetofi
nputf
rom gi
veni
nputset

(
(OPTI
ON_
C)) Tosol
vet
hepr
obl
em di
vi
desi
nputi
ntot
wopar
ts

(
(OPTI
ON_
D)) None

(
(CORRECT_
C B
HOI
CE))
(
A/B/
C/D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whichofthefol
lowingi
snotmet
hodbywhi
chwecansol
vet
he
r
ecurrencer
elat
ion
(
(OPTI
ON_
A)) Subst
it
uti
onMet
hod

(
(OPTI
ON_
B)) ChangeofVar
iabl
e

(
(OPTI
ON_
C)) Char
act
eri
sti
cEquat
ion

(
(OPTI
ON_
D)) None

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Subst
it
uti
onmet
hodi
susedf
or

(
(OPTI
ON_
A)) Forsol
vi
ngr
ecur
rencer
elat
ion

(
(OPTI
ON_
B)) Al
gor
it
hmi
cDesi
gnSt
rat
egy

(
(OPTI
ON_
C)) Bot
hA&B

(
(OPTI
ON_
D)) Nei
therAorB

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Char
act
eri
sti
cequat
ioni
susedf
or

(
(OPTI
ON_
A)) Al
gor
it
hmi
cDesi
gnSt
rat
egy

(
(OPTI
ON_
B)) Forsol
vi
ngr
ecur
rencer
elat
ion

(
(OPTI
ON_
C)) Bot
hA&B

(
(OPTI
ON_
D)) Nei
therAorB

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Changeofv
ari
abl
emet
hodi
susedf
or

(
(OPTI
ON_
A)) Al
gor
it
hmi
cDesi
gnSt
rat
egy

(
(OPTI
ON_
B)) Forsol
vi
ngr
ecur
rencer
elat
ion

(
(OPTI
ON_
C)) Bot
hA&B

(
(OPTI
ON_
D)) Nei
therAorB

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
) Di
vi
deandConquermet
hodi
s

(
(OPTI
ON_
A)) Al
gor
it
hmi
cDesi
gnSt
rat
egy

(
(OPTI
ON_
B)) Usedf
orsol
vi
ngr
ecur
rencer
elat
ion

(
(OPTI
ON_
C)) Bot
hA&B

(
(OPTI
ON_
D)) Nei
therAorB

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Di
vi
deandConquermet
hodi
s

(
(OPTI
ON_
A)) Al
gor
it
hmi
cDesi
gnSt
rat
egy

(
(OPTI
ON_
B)) Usedf
orsol
vi
ngr
ecur
rencer
elat
ion

(
(OPTI
ON_
C)) Usedt
ofi
ndoutopt
imal
sol
uti
ont
ogi
venpr
obl
em

(
(OPTI
ON_
D)) Takessequenceofdeci
siont
ofi
ndoutt
hesol
uti
on.

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Di
vi
deandConquermet
hodi
snot

(
(OPTI
ON_
A)) Al
gor
it
hmi
cDesi
gnSt
rat
egy

(
(OPTI
ON_
B)) Usedf
orsol
vi
ngr
ecur
rencer
elat
ion

(
(OPTI
ON_
C)) Usedtofi
ndoutsolut
iontogivenprobl
em bydi
vi
dinggi
ven
pr
oblem i
ntosub-
problem orsubt
ask
(
(OPTI
ON_
D)) Di
vi
dest
hepr
obl
em andcombi
net
hesol
uti
ons.

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Di
vi
deandConquermet
hodi
snot

(
(OPTI
ON_
A)) Usedf
orsol
vi
ngr
ecur
rencer
elat
ion

(
(OPTI
ON_
B)) Usedtofi
ndoutsolut
iontogivenprobl
em bydi
vi
dinggi
ven
pr
oblem i
ntosub-
problem orsubt
ask
(
(OPTI
ON_
C)) Bot
hA&B

(
(OPTI
ON_
D)) Nei
therAnorB

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Gr
eedymet
hodi
s

(
(OPTI
ON_
A)) Al
gor
it
hmi
cDesi
gnSt
rat
egy

(
(OPTI
ON_
B)) Usedf
orsol
vi
ngr
ecur
rencer
elat
ion

(
(OPTI
ON_
C)) Bot
hA&B

(
(OPTI
ON_
D)) Nei
therAorB

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Gr
eedymet
hodi
snot

(
(OPTI
ON_
A)) Al
gor
it
hmi
cDesi
gnSt
rat
egy

(
(OPTI
ON_
B)) Usedf
orsol
vi
ngr
ecur
rencer
elat
ion

(
(OPTI
ON_
C)) Usedt
ofi
ndoutopt
imal
sol
uti
ont
ogi
venpr
obl
em

(
(OPTI
ON_
D)) Takessequenceofdeci
siont
ofi
ndoutt
hesol
uti
on.

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Gr
eedymet
hodi
s

(
(OPTI
ON_
A)) Al
gor
it
hmi
cDesi
gnSt
rat
egy

(
(OPTI
ON_
B)) Usedf
orsol
vi
ngr
ecur
rencer
elat
ion

(
(OPTI
ON_
C)) Usedtofi
ndoutsolut
iontogivenprobl
em bydi
vi
dinggi
ven
pr
oblem i
ntosub-
problem orsubt
ask
(
(OPTI
ON_
D)) Di
vi
dest
hepr
obl
em andcombi
net
hesol
uti
ons.

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
) Gr
eedymet
hodi
snot

(
(OPTI
ON_
A)) Usedf
orsol
vi
ngr
ecur
rencer
elat
ion

(
(OPTI
ON_
B)) Usedt
ofi
ndoutopt
imal
sol
uti
ont
ogi
venpr
obl
em

(
(OPTI
ON_
C)) Bot
hA&B

(
(OPTI
ON_
D)) Nei
therAnorB

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whati
sti
mecompl exi
tyofmer
gesor
twhi
chuses
N)) di
vi
deandconquerstr
ategy
?
((
OPTI
ON_ O(
n.l
og(
n))
A))
((
OPTI
ON_ O(
log(
n))
B))
((
OPTI
ON_ O(
n)
C))
((
OPTI n2)
ON_ O(
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Adat
astr
ucturewhosesizei
sdeter
minedatcompil
e
N)) t
imeandcannotbechangedatr
untimeis_
_____
___
.
((
OPTI
ON_ ADT
A))
((
OPTI
ON_ st
ati
c
B))
((
OPTI
ON_ ephemer
al
C))
((
OPTI
ON_ per
manent
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Datastr
uctur
ewhichiscapableofexpr
essingmor e
N)) complexrel
ati
onshipt
hanthatofphysi
caladjacency
i
scall
ed_____
_____
____
.
((
OPTI
ON_ l
i
nkedl
i
st
A))
((
OPTI
ON_ nonl
i
neardat
ast
ruct
ure
B))
((
OPTI
ON_ dat
ast
ruct
ure
C))
((
OPTI
ON_ l
i
neardat
ast
ruct
ure
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Thecorr
ect
nessofadi
vi
deandconqueral
gor
it
hm i
s
N)) usual
l
yprovedby_
___
____
_.
((
OPTI
ON_ mat
hemat
ical
theor
em
A))
((
OPTI
ON_ mat
hemat
ical
induct
ion
B))
((
OPTI
ON_ de-
Mor
gan’
slaw
C))
((
OPTI
ON_ none
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Whichdat
astruct
ureinacompil
eri
susedf
or
N)) managi
nginf
ormationaboutv
ari
abl
esandt
hei
r
at
tri
but
es?
((
OPTI
ON_ Abst
ractDat
aTy
pe
A))
((
OPTI
ON_ Semant
icSt
ack
B))
((
OPTI
ON_ Sy
mbol
Tabl
e
C))
((
OPTI
ON_ Par
seTabl
e
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Theminimum numberofcompari
sonsrequi
redto
N)) det
erminei
fanintegerappear
smorethann/2ti
mes
i
nasortedarr
ayofni nt
egersi
s
((
OPTI
ON_ θ(
n)
A))
((
OPTI
ON_ θ(
logn)
B))
(
(OPTI
ON_ θ(
n.l
ogn)
C)
)
((
OPTI
ON_ θ(
1)
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Theti
mecompl exi
tyofanal
gori
thm T(
n),
wher
eni
s
N)) t
heinputsize,i
sgivenby
T(n)=T(n-1)+1/ nifn>1
Theorderofthi
salgori
thm i
s__
____
____
___.
((
OPTI
ON_ n
A))
((
OPTI
ON_ l
og(
n)
B))
((
OPTI
ON_ n.
n
C))
((
OPTI
ON_ n.
log(
n)
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Analgori
thm ismadeupoft woi
ndependentti
me
N)) complexi
tiesf(n)andg(n)
.Thenthecomplexi
ti
esof
theal
gori
thm isintheor
derof__
_____
____.
((
OPTI
ON_ f
(n).
g(n)
A))
((
OPTI
ON_ Mi
n(f
(n).
g(n))
B))
((
OPTI
ON_ Max(f
(n).
g(n))
C))
((
OPTI
ON_ f
(n)+g(
n)
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Timecomplexi
ti
esoft
hreeal
gori
thmsaregiv
en
N)) bel
ow.Whichshoul
dexecut
etheslowestf
orlar
ge
val
uesofN?
((
OPTI
ON_ O(
logN)
A))
((
OPTI
ON_ O(
N)
B))
((
OPTI N1/2)
ON_ O(
C))
((
OPTI
ON_ Noneoft
heabov
e
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON Considerthef
oll
owingpseudocode.Whati
sthet
otal
)
) numberofmul t
ipl
icat
ionst
obeperfor
med?
D=2
fori=1t ondo
f
orj =itondo
fork=j +1tondo
D=D*3
(
(OPTI A Hal
ON_ foft
hepr
oductoft
he3consecut
ivei
nteger
s
)
)
(
(OPTI
ON_
B One-
thi
rdoft
hepr
oductoft
he3consecut
ivei
nteger
s
)
)
(
(OPTI C One-
ON_ sixt
hoft
hepr
oductoft
he3consecut
ivei
nteger
)
)
(
(OPTI D Noneoft
ON_ heabov
e
)
)
((CORRECT_ C
CHOICE))
(A/B/C/
D)
((
EXPLANA
TION)
)
(OPTI
ONAL)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Whi choft
hegivenopti
onsprovi
desthei
ncreasi
ng
N)) orderofasymptot
iccomplexi
tyoff
uncti
onsf1,f
2,f
3
andf 4?
f1(n)=2^n
f2(n)=n^(
3/2)
f3(n)=nLogn
f4(n)=n^(
Logn)

((
OPTI
ON_ f
1,f
2,f
3,f
4
A))
((
OPTI
ON_ f
3,f
2,f
4,f
1
B))
((
OPTI
ON_ f
2,f
3,f
1,f
4
C))
((
OPTI
ON_ f
4,f
1,f
2,f
3
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Whatist i
mecomplexit
yoff
un(
)?
N)) i
ntfun(intn)
{
i
ntcount=0;
f
or( i
nti=n;i>0;
i/=2)
for(i
ntj =0;
j<i
;j++)
count+=1;
r
eturncount;
}
((
OPTI
ON_ O(
n.l
og(
n))
A))
((
OPTI
ON_ O(
log(
n))
B))
((
OPTI
ON_ O(
n.n)
C))
((
OPTI
ON_ O(
log(
n).
log(
n))
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA Thetimecompl exit
ycanbecal culatedbycounti
ng
TION)
) numberoft i
mestheexpressi
on" count=count+1;"i
s
(OPTI
ONAL executed.Theexpressi
onisexecut ed0+1+2+3+4
) +...
.+( n-
1)times.Ti
mecompl exity=Thet a(0+1+2
+3+. .+n- 1)=Theta(n*
(n-1)
/2)=Thet a(n^2)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O I
nanal y
sisofalgor
it
hm, appr
oxi
mat er
elati
onship
N)) betweenthesizeofthejobandtheamountofwor k
requi
redtodoisexpressedbyusing__
__ _
____.
((
OPTI
ON_ Cent
ral
tendency
A))
((
OPTI
ON_ Di
ff
erent
ial
equat
ion
B))
((
OPTI
ON_ Or
derofexecut
ion
C))
((
OPTI
ON_ Or
derofmagni
tude
D))
(
(CORRECT D
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Ifalgori
thm Ahasrunni
ngtime7n^
2+2n+3and
N)) algori
thm Bhasrunningti
me2n^2,t
hen_
___
___
___
_
((
OPTI
ON_ Bot
hhav
esameasy
mpt
oti
cti
mecompl
exi
ty
A))
((
OPTI
ON_ Bi
sasy
mpt
oti
cal
l
ygr
eat
er
B))
((
OPTI
ON_ Ai
sasy
mpt
oti
cal
l
ygr
eat
er
C))
((
OPTI
ON_ Noneoft
heabov
e
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Whati
sthesol
uti
ont
other
ecur
renceT(
n)=T(
n/2)+
N)) n
((
OPTI
ON_ O(
n)
A))
((
OPTI
ON_ O(
logn)
B))
((
OPTI
ON_ O(
n.l
ogn)
C))
((
OPTI
ON_ O(
n^2)
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Considert hefollowi
ngalgorit
hm:
N)) fact
orial(n){return1 if(n=1)el se ret
urn(
n*
fact
orial(n-1))}
Recurrencer elati
onforgivenalgori
thm i
s:
((
OPTI
ON_ T(
n)=n.
T(n-
1)+1
A))
((
OPTI
ON_ T(
n)=T(
n-1)+1
B))
((
OPTI
ON_ T(
n)=T(
n(n-
1))+1
C))
((
OPTI
ON_ T(
n)=T(
n-1)+n
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Gi
venacoll
ecti
onofalgor
ithmsthatr
unsonO( 1)
,
N)) O(
nlogn),
O(n),O(n^
2),O(l
ogn),O(n!
),or
dert
he
al
gor
it
hmsf r
om fast
esttoslowest
((
OPTI
ON_ O(
1),
O(nl
ogn)
,O(
n),
O(n^
2),
O(l
ogn)
,O(
n!)
A))
((
OPTI
ON_ O(
1),
O(l
ogn)
,O(
n),
O(nl
ogn)
,O(
n^2),
O(n!
)
B))
((
OPTI
ON_ O(
n),
O(l
ogn)
,O(
nlogn)
,O(
n^2),
O(n!
),O(
1),
C))
((
OPTI
ON_ O(
n!)
,O(
n),
O(l
ogn)
,O(
nlogn)
,O(
n^2),
O(1)
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Gi
venacoll
ecti
onofalgor
ithmsthatr
unsonO( 1)
,
N)) O(
nlogn),
O(n),O(n^
2),O(l
ogn),O(n!
),or
dert
he
al
gor
it
hmsf r
om fast
esttoslowest
((
OPTI
ON_ O(
1),
O(nl
ogn)
,O(
n),
O(n^
2),
O(l
ogn)
,O(
n!)
A))
((
OPTI
ON_ O(
1),
O(l
ogn)
,O(
n),
O(nl
ogn)
,O(
n^2),
O(n!
)
B))
((
OPTI
ON_ O(
n),
O(l
ogn)
,O(
nlogn)
,O(
n^2),
O(n!
),O(
1),
C))
((
OPTI
ON_ O(
n!)
,O(
n),
O(l
ogn)
,O(
nlogn)
,O(
n^2),
O(1)
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Recur
sivefunct
ioni
mpl
ement
swhi
chmechani
sm?
N)) 1)Queue
2)LI
FO
3)FIFO
4)FILO
((
OPTI
ON_ Onl
y1
A))
((
OPTI
ON_ 2and3
B))
((
OPTI
ON_ 1and4
C))
((
OPTI
ON_ Al
l
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Considerthef
oll
owingcharact
erist
icsconnect
edwith
N)) aprogram.
(i
)Theinputtotheprogram
(i
i)Thetimecomplexit
yofthealgori
thm under
lyi
ng
theprogram
(i
ii
)Thequali
tyoft
heCompil
er
(i
v)Thenatur
eandspeedofthemachi
ne
Theknowledgeofwhichoft
heabovei
sneededt
o
cal
culat
etheexactr
unni
ngti
meofaprogram?

((
OPTI
ON_ (
i)and(
ii
)onl
y
A))

((
OPTI
ON_ (
i)
,(i
i
)and(
ii
i)onl
y
B))

((
OPTI
ON_ (
i)
,(i
i
)and(
iv)onl
y
C))

((
OPTI
ON_ (
i)
,(i
i
i)and(
iv)onl
y
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O
N))
((
OPTI
ON_
A))
((
OPTI
ON_
B))
((
OPTI
ON_
C))
((
OPTI
ON_
D))
(
(CORRECT
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Whatist
hev al
ueoffol
lowi
ngrecur
rence.
N)) T(
n)=T(n/4)+T(n/2)+cn^2
T(
1)=c
T(
0)=0
Wherecisaposit
iveconst
ant
((
OPTI
ON_
O(
n^3)
A))
((
OPTI
ON_
O(
n^2)
B))
((
OPTI
ON_
O(
n^2Logn)
C))
((
OPTI
ON_ O(
nLogn)
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Whatisthesol
uti
onoft
her
ecur
rencer
elat
ion
N)) an=an-1+2an-
2
wit
ha0=2anda1=7?
((
OPTI
ON_
an=5.2n-( n
-1)
A))
ON_ an=2n-( n
((
OPTI -1)
B))
ON_ an=3.2n-( n
((
OPTI -1)
C))
((
OPTI
ON_ None
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O
Sol
vet
her
ecur
rencer
elat
ionFn=2Fn−1−2Fn−2
N))
wher
eF0=1andF1=3

((
OPTI
ON_ Fn=(
√2)
n(cos(
n.π/4))
A))
((
OPTI
ON_
Fn=(
√2)
n
B))
((
OPTI
ON_
Fn=(
√2)
n(cos(
n.π/4)+2si
n(n.π/4)
)
C))
((
OPTI
ON_ None
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O
Sol
vet
her
ecur
rencer
elat
ionFn=10Fn−1−25Fn−2
N))
wher
eF0=3andF1=17

((
OPTI
ON_
Fn=3n+2n.
2n
A))
((
OPTI
ON_
5n+(
Fn=3. 2/5).
n.2n
B))
((
OPTI
ON_
Fn=(
2/5).
n.2n
C))
((
OPTI
ON_ None
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
(
(EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O n
Sol
vetherecur
rencer
elat
ionFn=3Fn−1+10Fn−2+7.
5
N))
whereF0=4andF1=3

((
OPTI
ON_
Fn=n5n+1+6. n
(−2) 5n
−2.
A))
((
OPTI
ON_
Fn=n5n+1+( n
−2) 5n
−2.
B))
((
OPTI
ON_
Fn=n5n+1+6. n
(−2)
C))
((
OPTI
ON_ None
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Asequenceisdef
inedbyther
ecur
rencerel
ati
onun+1=
N)) pun+q.Whichofthefol
l
owingwouldbean
expr
essi
onforu2?
((
OPTI
ON_
u2=3p2+pq+q
A))
((
OPTI
ON_
u2=3p+q
B))
((
OPTI
ON_
u2=6p+2q
C))
((
OPTI
ON_
u2=9p2+6pq+q2
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Whati
stheval
ueoff
oll
owi
ngr
ecur
rence.
N)) T(
n)=2T(n/
2)+n

((
OPTI
ON_
O(
n^3)
A))
((
OPTI
ON_
O(
n^2)
B))
((
OPTI
ON_
O(
n^2Logn)
C))
((
OPTI
ON_ O(
nLogn)
D))
(
(CORRECT D
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Whati
sthevalueoff
oll
owi
ngr
ecur
rence.
N)) g(
n+1)=n^2+g(n)

((
OPTI
ON_
g(
n)=n(
2n-
1)
A))
((
OPTI
ON_
g(
n)=(
n-1)
n(2n-
1)
B))
((
OPTI
ON_
g(
n)=c1+1/
6(n-
1)n(
2n-
1)
C))
((
OPTI
ON_ None
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Findt
hesol ut
ionfort
her
ecur
rencer
elat
ion
N)) xn=6xn-1-9xn-2
Wherex1=3andx0=2
((
OPTI
ON_
3n–n.3n
xn=2.
A))
((
OPTI
ON_
xn=3n–n.3n
B))
((
OPTI
ON_
3n–3n
xn=2.
C))
((
OPTI
ON_
3n
xn=2.
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Findthesol utionf
ort
her
ecur
rencer
elat
ion
N)) xn=2xn-1-5xn-2
Wherex1=5andx0=1

((
OPTI
ON_ n+1 n+1
xn=5/
2(1+2i
) +5/
2(1-
2i)
A))
((
OPTI
ON_ n+1 n+1
xn=2/
5(1+2i
) +5/
2(1-
2i)
B))
((
OPTI
ON_ n+1 n+1
xn=2/
5(1+2i
) +2/
5(1-
2i)
C))
((
OPTI
ON_
None
D))
(
(CORRECT B
_
CHOICE)
)
(
A/B/
C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Findthesoluti
onf orther
ecur
rencer
elat
ion
n
N)) xn=3xn-1+10xn-2+7.5
Wherex1=3andx0=4
((
OPTI
ON_
5n+1 -2.
5n+6( n
xn=n. -2)
A))
((
OPTI
ON_ n
xn=6(
-2)
B))
((
OPTI
ON_
5n+6( n+1
xn=n.
5-2. -2)
C))
((
OPTI
ON_
None
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Findt
hesol uti
onf ort
herecur
rencer
elat
ion
n
N)) xn=10xn-1+25xn-2+8.
5
Wherex1=10andx0=6
((
OPTI
ON_ n
xn=(8n+6)
(5)
A))
((
OPTI
ON_
4n2+8n+6) n
xn=( (5)
B))
((
OPTI
ON_
4n2+8) n
xn=( (5)
C))
((
OPTI
ON_
None
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Findt
hesol ut
ionf
ort
her
ecur
rencer
elat
ion
N)) xn=10xn/2+1
Wherex1=1
((
OPTI
ON_
xn=l
og2n+1
A))
((
OPTI
ON_
xn=l
ogn
B))
((
OPTI
ON_
xn=nl
ogn
C))
((
OPTI
ON_
None
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Consi
derthepolynomialp(
x)=a0+a1x+a2x^ 2
N)) +a3x^
3,whereai!=0,foral
li.Themini
mum number
ofmulti
pli
cat
ionsneededtoev al
uat
eponaninputx
i
s:
((
OPTI
ON_
3
A))
((
OPTI
ON_
4
B))
((
OPTI
ON_
6
C))
((
OPTI
ON_
9
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)
) 2
(
1/2/
3..
.)
(
(QUESTI
O Whati
sthev
alueoff
oll
owi
ngr
ecur
rence.
N))
T(
n)=3T(
n/4)+n
((
OPTI
ON_
O(
n^3)
A))
((
OPTI
ON_
O(
n^2)
B))
((
OPTI
ON_
O(
n^2Logn)
C))
((
OPTI
ON_ O(
n)
D))
(
(CORRECT D
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Whati
sthev
alueoff
oll
owi
ngr
ecur
rence.
N))
T(
n)=2T(
n/4)+n2
((
OPTI
ON_
O(
n^3)
A))
((
OPTI
ON_
O(
n^2)
B))
((
OPTI
ON_
O(
n^2Logn)
C))
((
OPTI
ON_ O(
n)
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Whati
sthev
alueoff
oll
owi
ngr
ecur
rence.
N))
T(
n)=4T(
n/2)+n3
((
OPTI
ON_
O(
n^3)
A))
((
OPTI
ON_
O(
n^2)
B))
((
OPTI
ON_
O(
n^2Logn)
C))
((
OPTI
ON_ O(
n)
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Ther
unni
ngt
imeofanal
gor
it
hm i
srepr
esent
edbyt
he
N)
) foll
owingr ecur
rencerel
ati
on:
i
fn<=3t hen T(n)=n
elseT(n)=4T( n/3)+cn2
Whi choneoft hefol
lowingrepr
esent
sthet
ime
compl exi
tyofthealgori
thm?
((
OPTI
ON_
Θ(
n)
A))
((
OPTI
ON_
Θ(
nlogn)
B))
((
OPTI
ON_
n2)
Θ(
C))
((
OPTI
ON_
n2l
Θ( ogn)
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Ther unni
ngt imeofanal gorit
hm isrepr
esent
edbyt
he
N)) foll
owingr ecurrencerel
ation:
i
fn<=3t hen T( n)=n
elseT(n)=3T( n/ 3)+cn2
Whi choneoft hef ol
lowingr epresent
stheti
me
compl exi
tyoft healgori
thm?
((
OPTI
ON_
Θ(
n)
A))
((
OPTI
ON_
Θ(
nlogn)
B))
((
OPTI
ON_
n2)
Θ(
C))
((
OPTI
ON_
n2l
Θ( ogn)
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O
Whichoneofthefol
lowingcor
rect
lydet
erminest
he
N))
sol
uti
onoftherecur
rencerel
ati
onwithT(1)=1?

T(
n)=2T(
n/2)+Logn
((
OPTI
ON_ Θ(
n)
A))
((
OPTI
ON_ Θ(
nLogn)
B))
((
OPTI
ON_ Θ(
n*n)
C))
((
OPTI
ON_ Θ(
logn)
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Whati
sthev
alueoff
oll
owi
ngr
ecur
rence.
N))
T(
n)=4T(
n/2)+C

((
OPTI
ON_ Θ(
n)
A))
((
OPTI
ON_ Θ(
nLogn)
B))
((
OPTI n2)
ON_ Θ(
C))
((
OPTI
ON_
Θ(
logn)
D))

(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Whati
sthev
alueoff
oll
owi
ngr
ecur
rence.
N))
T(
n)=T(
n/2)+Θ(
n)

((
OPTI
ON_ Θ(
n)
A))
((
OPTI
ON_ Θ(
nLogn)
B))
((
OPTI n2)
ON_ Θ(
C))
((
OPTI
ON_
Θ(
logn)
D))

(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Whati
sthev
alueoff
oll
owi
ngr
ecur
rence.
N))
T(
n)=6T(
n/3)+n2l
ogn

((
OPTI
ON_ Θ(
n)
A))
((
OPTI
ON_ Θ(
nLogn)
B))
((
OPTI
ON_
C)) n2l
Θ( ogn)
((
OPTI
ON_ Θ(
logn)
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Whati
stheval
ueoff
oll
owi
ngrecur
rence.
N)) T(
n)=5T(n/
5)+n,T(
1)=1,T(
0)=0

((
OPTI
ON_ Ө(
n)
A))
((
OPTI
ON_ Ө(
n^2)
B))
((
OPTI
ON_ Ө(
sqr
t(n)
)
C))
((
OPTI
ON_ Ө(
nLogn)
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Whati sthewor stcaseti
mecompl exi
tyoffol
lowi
ng
N)) i
mpl ement ationofsubsetsum probl
em.
//Returnst rueiftherei
sasubsetofset[]wit
hsunequal
togi
ven
sum
booli
sSubset Sum(int
set[
],
int
n,i
ntsum)
{
/
/BaseCases
i
f(
sum ==0)
r
eturntrue;
i
f(
n==0&&sum ! =0)
r
eturnfalse;

/
/Iflastel
ementisgr
eaterthansum,t
heni
gnor
eit
i
f(
set[n-
1]>sum)
r
eturni
sSubset
Sum(set
,n-1,sum);

/*else,checkifsum canbeobt ainedbyanyoft


hef
oll
owi
ng
(
a)includi
ngt helastelement
(
b)excludingthelastelement * /
ret
urnisSubsetSum( set,
n-1,sum)||
i
sSubsetSum( set,n-
1,sum-set[
n-1]
);
}

((
OPTI
ON_ O(
n*2^
n)
A))
(( ON_ O(
OPTI n^2)
B))
((
OPTI
ON_ O(
n^2*2^
n)
C))
((
OPTI
ON_ O(
2^n)
D))
(
(CORRECT D
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O SupposeT(n)=2T(
n/2)+n,
T(0)=T(
1)=1Whi
chone
N)) ofthefol
l
owingisf
alse.

((
OPTI
ON_ T(
n)=O(
n^2)
A))
((
OPTI
ON_ T(
n)= (
nLogn)
B))
((
OPTI
ON_ T(
n)= (
n^2)
C))
((
OPTI
ON_ T(
n)=O(
nLogn)
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Former
gingt
wosor
tedl
ist
sofsizesm andnintoa
N)) sort
edl
i
stofsi
zem +n,
wer equi
recompari
sonsof

((
OPTI
ON_
O(
m)
A))
((
OPTI
ON_ O(
n)
B))
((
OPTI
ON_ O(
m+n)
C))
((
OPTI
ON_
O(
log(
m)+l
og(
n))
D))

(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Consi
dert
hef
oll
owi
n-
gr
ecur
rence:
N)) T (n) = 2T ff.Jnl) + 1, T (1) = 1
Whi
choneoft
hef
oll
owi
ngi
str
ue?
((
OPTI
ON_ T(
n)= (
logl
ogn)
A))
((
OPTI
ON_ T(
n)= (
logn)
B))
((
OPTI
ON_ T(
n)= (
sqr
t(n)
)
C))
((
OPTI
ON_ T(
n)= (
n)
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Ther unni
ngt imeofanal gorit
hm isrepr
esent
edbyt
he
N)) foll
owingr ecurrencerel
ation:
i
fn<=3t hen T( n)=n
elseT(n)=T( n/3)+cn
Whi choneoft hef ol
lowingr epresent
stheti
me
compl exi
tyoft healgori
thm?
((
OPTI
ON_ (
n)
A))
((
OPTI
ON_ (
nlogn)
B))
((
OPTI
ON_ (
n^2)
C))
((
OPTI
ON_ (
n^2l
ogn)
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Ther unningti
meoft hefol
l
owi
ngal
gori
thm
N)) Pr ocedureA(n)
{
Ifn>1
return(A(n/2)
+A(n/
2));
}
i
sbestdescr i
bedbywhichoft
hef
oll
owingrecur
rence
relati
on

((
OPTI
ON_ T(
n)=2T(
n–2)+2
A))
(( ON_ T(
OPTI n)=2T(
n–1)+n
B))
((
OPTI
ON_ T(
n)=2T(
n/2)+1
C))
((
OPTI
ON_
T(
n)=T(
n–1)+1
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Ther unningti
meofthefol
l
owi
ngal
gori
thm
N)) Pr ocedureA(n)
{
Ifn<=2
returnA(n-1)
;
}
i
sbestdescr i
bedbywhi
choft
hef
oll
owingrecur
rence
relati
on

((
OPTI
ON_ T(
n)=2T(
n–2)+2
A))
(( ON_ T(
OPTI n)=2T(
n–1)+n
B))
((
OPTI
ON_ T(
n)=2T(
n/2)+1
C))
((
OPTI
ON_
T(
n)=T(
n–1)+1
D))
(
(CORRECT D
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)
) 2
(
1/2/
3..
.)
(
(QUESTI
O Therunni
ngti
meofthef
ollowi
ngalgori
thm
N)) Pr
ocedureA(n)
I
fn<=2r et
urn(
1)el
ser
eturnA([
√n])
;
i
sbestdescri
bedby

(( ON_ O(
OPTI n)
A))
(( ON_ O(
OPTI logn)
B))
((
OPTI
ON_ O(
1ogl
ogn)
C))
((
OPTI
ON_ O(
1)
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Whatist
heti
mecomplexi
tyoft
hef
oll
owi
ngr
ecur
siv
e
N)) f
uncti
on:
i
ntDoSomet
hing(
int
n)
{
i
f(
n<=2)
r
etur
n1;
el
se
r
etur
n(DoSomet
hing(
fl
oor
(sqr
t(n)
))+
n);
}

((
OPTI
ON_ O(
n)
A))
((
OPTI
ON_ O(
nlogn)
B))
((
OPTI
ON_ O(
logn)
C))
((
OPTI
ON_ O(
logl
ogn)
D))
(
(CORRECT D
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Thet i
mecompl exit
yofthefol
lowingCfunct
ioni
s
N)) (assumen>0
i
nt r
ecursi
ve(mtn)
{
i
f(n==1)
r
eturn(
1);
el
se
r
eturn(
recur
sive(n-
1)+recursi
ve(n-
1))
;
}

((
OPTI
ON_
0(
n)
A))
((
OPTI
ON_
0(
nlogn)
B))
((
OPTI
ON_
0(
n^2)
C))
((
OPTI
ON_
0(
2^n)
D))
(
(CORRECT D
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
((QUESTIO Consi
dert
hef
oll
owi
ngr
ecur
renceT(
n)=3T(
n/5)+l
gn
hati
sthev
aNl
u)
e)ofT(
n)?
((
OPTI nlog53)
ON_ Ө(
A))

((
OPTI nlog35)
ON_ Ө(
B))
((
OPTI
ON_ Ө(
nlogn)
C))
((
OPTI
ON_ Ө(
logn)
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Considert
hefol
l
owingrecur
rence.
N)) T(n)=T(√n)+Ө(l
ogl
ogn)

Whati
sthev
alueofr
ecur
rence?

2
((
OPTI
ON_ Ө(
(l
ogl
ogn))
A))
((
OPTI
ON_ Ө(
logl
ogn
B))
((
OPTI
ON_ Ө(
n)
C))
((
OPTI
ON_ Ө(
logl
ogl
ogn)
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Whi choneofthefol
lowingcor
rect
lydet
erminest
he
N)) soluti
onoftherecur
rencerel
ati
onwithT(1)=1?
T(n)=2T(n/2)+Logn
((
OPTI
ON_ Θ(
n)
A))
((
OPTI
ON_ Θ(
nLogn)
B))
((
OPTI
ON_
C)) Θ(
n*n)
((
OPTI
ON_ Θ(
logn)
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Letf(
n)=nandg(n)=n(1+sinn),
wher
enisaposit
ive
N)) i
nteger.Whi
choft
hefollowi ngstat
ement
sis/
are
corr
ect?
I.f(
n)=O(g(n)
)
II
.f(
n)=Ω(g(n)
)
((
OPTI
ON_
Onl
yI
A))
((
OPTI
ON_
Onl
yII
B))
(
( ON_ Bot
OPTI hIandI
I
C)
)
((
OPTI
ON_
Nei
therInorI
I
D))
(
(CORRECT D
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Consideral istofr ecursi
veal gor i
thmsandal i
stof
N)) recurr
encerelationsasshownbel ow.Eachr ecurr
ence
rel
ati
oncor respondst oexact l
yoneal gor
ithm andis
usedtoder i
vet het i
mecompl exit
yoft healgori
thm.
RecursiveAl
gor it
hm Recur renceRel ati
on
P.BinarysearchI .T(n)=T(n-k)+T( k)+cn
Q.Mer gesortII
.T( n)=2T(n-1)+1
R.QuicksortIII
.T(n)=2T( n/2)+cn
S.TowerofHanoi IV.T(n)=T( n/2)+1
((
OPTI
ON_ P-
II
,Q-
II
I,
R-I
V,S-
I
A))
((
OPTI
ON_ P-
II
,Q-
II
I,
R-I
V,S-
I
B))
((
OPTI
ON_ P-
II
I,
Q-I
I,
R-I
V,S-
I
C))
(( ON_ P-
OPTI IV,
Q-I
I,
R-I
,S-
II
I
D))
(
(CORRECT B
_
CHOICE))
(
A/B/
C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Consi derther
ecur
rencerel
ati an=6n2+2n+
ona1=8,
N)) an-1.Leta99=kx104.Theval
ueofKis_
___
_

((
OPTI
ON_
190
A))
((
OPTI
ON_
296
B))
((
OPTI
ON_
198
C))
((
OPTI
ON_
200
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Whenn=22kforsomek≥0,ther
ecur
rencer
elat
ion
N)) T(
n)=√(2)T(
n/2)+√n,
T(1)=1
ev
aluat
esto:
((
OPTI
ON_
√(
n)(
logn+1)
A))
((
OPTI
ON_
√(
n)(
logn)
B))
((
OPTI
ON_
√(
n)l
og√(
n)
C))
((
OPTI
ON_
nl
og√(
n)
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Consi derthef ollowi ngr ecur r
encer
elat
ion
T( 1) = 1
N))
T(n + 1) = T(n)+ L.Jn + 1 J for all n~1

Thev
al m2)f
ueofT( orm ≥1i
s
((
OPTI
ON_
(
m/6)(
21m -39)+4
A))
((
OPTI
ON_
(
m/ 4m2-3m +5)
6)(
B))
((
OPTI
ON_
(
m/ m2.5-11m +20)–5
2)(
C))
((
OPTI
ON_
(
m/ 5m3-34m2+137m -104)+(
6)( 5/6)
D))
(
(CORRECT B
_
CHOICE)
)
(
A/B/
C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Thesol
uti
ont
other
ecur
renceequat
i 2k)=3T(
onT( 2k-
,
T(1)=1,
is:N))
((
OPTI
ON_ k
2
A))
((
OPTI
ON_
3k+1-1)
( /2
B))
((
OPTI
ON_ log
3 2k
C))
((
OPTI
ON_ log
2 3k
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
O Selectthecorr
ectasympt
oti
ccomplexi
tyofan
N)) al
gor i
thm wit
hrunti
meT(n,n)wher
e
T(x,c)=Θ(x)forc<=2,
T(
c,y
)=Θ(
y)f
orc<=2,and
T(
x,y
)=Θ(
x+y
)+T(x/
2,y/2)
((
OPTI
ON_
Θ(
nLogn)
A))
((
OPTI
ON_
n2)
Θ(
B))
((
OPTI
ON_
Θ(
n)
C))
((
OPTI
ON_
n2Logn)
Θ(
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Ar
ray
sinC++ar
e
N))
((
OPTI
ON_ RowMaj
or
A))
((
OPTI
ON_ Col
umnMaj
or
B))
((
OPTI
ON_ Di
agonal
Maj
or
C))
((
OPTI
ON_ Noneoft
heabov
e
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whichamongt hef
oll
owi ngpai
rsofoper
ati
onsi
s
N)) Suppor
tedbyanarrayADT?
i) St oreandr
etrieve
ii
) I nser
tanddelete
ii
i
) Copyanddel et e
iv
) Appendandcopy
((
OPTI
ON_ (
i)
A))
((
OPTI
ON_ (
ii
)
B))
((
OPTI
ON_ (
ii
i)
C))
((
OPTI
ON_ (
iv)
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Thenumberofel
ementsi
nanarr
ay
N)) ARRAY[
b1:u1,
b2:
u2]i
sgiv
enby
((
OPTI
ON_ (
u1-
b1-
1)(
u2-
b2-
1)
A))
((
OPTI
ON_ (
u1.
u2)
B))
((
OPTI
ON_ (
u1-
b1)
(u2-
b2)
C))
((
OPTI
ON_ (
u1-
b1+1)
(u2-
b2+1)
D))
(
(CORRECT D
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Amultidi
mensionalar
rayOPEN[
0:2,
10:
20,
3:4,
-
10:
2]
N)) cont
ains___
___elements
((
OPTI
ON_ 240
A))
((
OPTI
ON_ 858
B))
((
OPTI
ON_ 390
C))
((
OPTI
ON_ 160
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Fort
hearrayA[
1:u1,
1:u2,
1:u3]wher
eaisthebase
N)) addr
ess,
theaddressofA[i,
j,
1]i
sgivenby
((
OPTI
ON_ a+(
i-
1)u2u3+(
j-
1)u3
A))
((
OPTI
ON_ a+i
.u2u3+j
.u3
B))
((
OPTI
ON_ a+(
i-
1)u1u2+(
j-
1)u2
C))
((
OPTI
ON_ a+i
.u1u2+j
.u2
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O ____i
sastruct
ureusedtorepresentt
hel
i
near
N)) rel
ati
onshi
pbetweenelementsbymeansof
sequent
ial
memor ylocat
ions
((
OPTI
ON_ Li
nkedLi
st
A))
((
OPTI
ON_ Ar
ray
B))
((
OPTI
ON_ Poi
nter
C))
((
OPTI
ON_ St
ack
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O A___
_isali
stoff
ini
tenumberofhomogeneousdat
a
N)) el
ements
((
OPTI
ON_ Li
nearar
ray
A))
((
OPTI
ON_ Poi
nter
B))
((
OPTI
ON_ Li
nkedLi
st
C))
((
OPTI
ON_ Tr
ee
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Thenumberofel
ement
sni
scal
l
edt
hel
engt
hor_
__
N)) oft
hearr
ay
((
OPTI
ON_ UpperBound
A))
((
OPTI
ON_ LowerBound
B))
((
OPTI
ON_ Si
ze
C))
((
OPTI
ON_ Var
iabl
e
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O ThenumberKi
nA[
K]i
scal
l
edt
hesubscr
iptort
he
N)) ___
__
((
OPTI
ON_ Si
ze
A))
((
OPTI
ON_ I
ndex
B))
((
OPTI
ON_ Var
iabl
e
C))
((
OPTI
ON_ Const
ant
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Whichofthef
oll
owi
ngar
enotpar
toft
hear
ray
N)) decl
arat
ion?
((
OPTI
ON_ Nameoft
hear
ray
A))
((
OPTI
ON_ Dat
aty
peoft
hear
ray
B))
((
OPTI
ON_ I
ndexsetoft
hear
ray
C))
((
OPTI
ON_ Lengt
hoft
hear
ray
D))
(
(CORRECT D
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Thepr
ocessofaccessi
ngandpr
ocessi
ngeach
N)) el
ementofanarr
ayAexactl
yoncei
scall
ed___
___
_
((
OPTI
ON_ Del
eti
ng
A))
((
OPTI
ON_ I
nser
ti
ng
B))
((
OPTI
ON_ Tr
aver
sing
C))
((
OPTI
ON_ Sear
chi
ng
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Twodimensi
onal
arr
aysar
esomet
imescal
l
ed_
___
__
N)) ar
ray
s.
((
OPTI
ON_ I
nteger
A))
((
OPTI
ON_ Bool
ean
B))
((
OPTI
ON_ Mat
ri
x
C))
((
OPTI
ON_ Real
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Representat
ionofatwodimensi
onal
arrayasone
N)) si
nglecolumnofr owsandmappingi
tsequent
ial
l
yis
cal
led____represent
ati
on
((
OPTI
ON_ Row-
Maj
or
A))
((
OPTI
ON_ Row
B))
((
OPTI
ON_ Col
umn-
Maj
or
C))
((
OPTI
ON_ Col
umn
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Matr
iceswit
hrel
ati
velyhi
ghpr
opor
ti
onofzer
oent
ri
es
N)) ar
ecalled_
____matr
ices
((
OPTI
ON_ Tr
iangul
ar
A))
((
OPTI
ON_ Di
agonal
B))
((
OPTI
ON_ Spar
se
C))
((
OPTI
ON_ Adj
acency
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O _____
array
sarewher
etheelementsint
hedif
fer
ent
N)) array
swi t
hthesamesubscr
iptbel
ongtot
hesame
record.
((
OPTI
ON_ Onedi
mensi
onal
A))
((
OPTI
ON_ Par
all
el
B))
((
OPTI
ON_ Two-
dimensi
onal
C))
((
OPTI
ON_ St
ati
c
D))
(
(CORRECT B
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Amat ri
xinwhichnonzer
oentr
iescanonlyoccur
eon
N)) thediagonaloronel
ementsi
mmedi at
elyaboveor
belowthediagonali
scal
led_
_____matri
x.
((
OPTI
ON_ Tr
iangul
ar
A))
((
OPTI
ON_ Tr
idi
agonal
B))
((
OPTI
ON_ Spar
se
C))
((
OPTI
ON_ Si
mpl
e
D))
(
(CORRECT C
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
O Recor
dscanbest
oredi
nanar
eaofmemor
ycal
l
ed
N)) ___
_memory
((
OPTI
ON_ Dy
nami
c
A))
((
OPTI
ON_ St
ati
c
B))
((
OPTI
ON_ Si
mpl
e
C))
((
OPTI
ON_ Par
all
el
D))
(
(CORRECT A
_
CHOI CE)
)
(
A/B/C/D)
((
EXPLANA
TION)
)
(OPTI
ONAL
)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
) Thememoryaddr
essoft
hef
ir
stel
ementofan
arr
ayi
scal
l
ed
(
(OPTI
ON_
A)) f
looraddr
ess
(
(OPTI
ON_
B)) f
oundat
ionaddr
ess
(
(OPTI
ON_
C)) f
ir
staddr
ess
(
(OPTI
ON_
D)) baseaddr
ess

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) Eachar
ON) raydecl
arati
onneednotgi
ve,
impl
i
cit
lyor
expl
ici
tl
y,thei
nformati
onabout
(
(OPTI
ON_
A)) t
henameofar
ray
(
(OPTI
ON_
B)) t
hedat
aty
peofar
ray
(
(OPTI
ON_
C)) t
hef
ir
stdat
afr
om t
hesett
obest
ored
(
(OPTI
ON_
D)) t
hei
ndexsetoft
hear
ray
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) Theel
ON) ementsofanar rayar
estoredsuccessiv
elyi
n
memor ycel
lsbecause
(
(OPTI
ON_ ) byt
A) hiswaycomput ercankeeptr
ackonlythe
addressoft
hefirstelementandtheaddressesof
otherel
ementscanbecal cul
ated
(
(OPTI
ON_
B)) ar
chi
tectur
eofcomputermemorydoesnotal
l
ow
ar
ray
st ostor
eothert
hanser
ial
l
y
(
(OPTI
ON_
C)) bot
hofabov
e

(
(OPTI
ON_
D)) noneofabov
e

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)
Thememoryaddressoff
if
thel
ementofanar
ray
canbecal
cul
atedbythef
ormul
a

(
(OPTI
ON_
A)) LOC(Ar
ray[
5]=Base(
Arr
ay)
+w(
5-l
owerbound),
wherewisthenumberofwor
dspermemor ycel
l
fort
hearr
ay
(
(OPTI
ON_
B)) LOC(Ar
ray[
5])
=Base(
Arr
ay[
5])
+(5-
lowerbound),
wherewisthenumberofwordspermemor ycel
l
fort
hearr
ay
(
(OPTI
ON_
C)) LOC(Ar
ray[
5])
=Base(
Arr
ay[
4])
+(5-
Upperbound)
,
wherewisthenumberofwordspermemorycell
fort
hearr
ay
(
(OPTI
ON_
D)) Noneofabov
e

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)
Whichofthef
oll
owi
ngdat
ast
ruct
uresar
eindexed
st
ruct
ures?

(
(OPTI
ON_
A)) l
i
nearar
ray
s
(
(OPTI
ON_
B)) l
i
nkedl
i
sts
(
(OPTI
ON_
C)) bot
hofabov
e
(
(OPTI
ON_
D)) noneofabov
e
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)
Twodi
mensi
onal
arr
aysar
eal
socal
l
ed

(
(OPTI
ON_
A)) t
abl
esar
ray
s
(
(OPTI
ON_
B)) mat
ri
xar
ray
s
(
(OPTI
ON_
C)) bot
hofabov
e
(
(OPTI
ON_
D)) noneofabov
e

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)
Av
ari
abl
ePi
scal
l
edpoi
nteri
f

(
(OPTI
ON_
A)) Pcont
ainst
headdr
essofanel
ementi
nDATA.
(
(OPTI
ON_
B)) Ppoi
ntst
otheaddr
essoff
ir
stel
ementi
nDATA
(
(OPTI
ON_
C)) Pcanst
oreonl
ymemor
yaddr
esses
(
(OPTI
ON_
D)) Pcont
aint
heDATAandt
headdr
essofDATA
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)
Whi
chofthef
oll
owingdat
ast
ruct
urecan'
tst
ore
t
henon-
homogeneousdat
ael
ements?

(
(OPTI
ON_
A)) Ar
ray
s
(
(OPTI
ON_
B)) Recor
ds
(
(OPTI
ON_
C)) Poi
nter
s

(
(OPTI
ON_
D)) None
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)
Whichofthef
oll
owingdat
astruct
urest
oret
he
homogeneousdatael
ements?

(
(OPTI
ON_
A)) Ar
ray
s
(
(OPTI
ON_
B)) Recor
ds
(
(OPTI
ON_
C)) Poi
nter
s
(
(OPTI
ON_
D)) None

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)
Eachdat
ait
em inarecor
dmaybeagr oupit
em
composedofsub-
it
ems;thosei
temswhichare
i
ndecomposabl
earecall
ed

(
(OPTI
ON_
A)) el
ement
aryi
tems
(
(OPTI
ON_
B)) at
oms
(
(OPTI
ON_
C)) scal
ars
(
(OPTI
ON_
D)) al
lofabov
e

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)
Thedi
ff
erencebet
weenl
i
nearar
rayandar
ecor
dis

(
(OPTI
ON_
A)) Anarr
ayi
ssui
tabl
eforhomogeneousdatabutt
he
dat
ait
emsinarecor
dmayhav edi
ffer
entdat
atype
(
(OPTI
ON_
B)) I
nar ecor
d,t
heremaynotbeanat
ural
order
ingi
n
opposedtol
inearar
ray
.
(
(OPTI
ON_
C)) Arecor
dform ahi
erar
chi
cal
str
uct
urebutal
i
near
ar
raydoesnot
(
(OPTI
ON_
D)) Al
lofabov
e
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
) Eacharraydecl
arati
onneednotgi
ve,
impl
i
cit
lyor
expl
ici
tl
y,thei
nformati
onabout
(
(OPTI
ON_
A)) Thenameofar
ray
(
(OPTI
ON_
B)) Thedat
aty
peofar
ray
(
(OPTI
ON_
C)) Thef
ir
stdat
afr
om t
hesett
obest
ored
(
(OPTI
ON_
D)) Thei
ndexsetoft
hear
ray
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
) Theel
ementsofanar
rayar
est
oredsuccessi
vel
yin
memorycel
l
sbecause
(
(OPTI
ON_
A)) bythiswaycomputercankeeptr
ackonlythe
addressofst
hefir
stel
ementandt headdr
essesof
otherel
ementscanbecalcul
ated
(
(OPTI
ON_
B)) thear
chi
tect
ureofcomputermemor ydoesnot
all
owarr
aystostor
eotherthanser
ial
ly
(
(OPTI
ON_
C)) bot
hofabov
e
(
(OPTI
ON_
D)) noneofabov
e
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) C
ON) onsi
#i
ncl
derf
ol
ude<i
l
owi
ostr
ngcode:
eam.h>
i
ntmai n(
)
{
i
nta[10];
A[0]
=10;A[1]
=4;
A[3]
=15;
cout
<<A[2+1];
}
Whatwi l
lbetheout
putoff
oll
owi
ngcode?
(
(OPTI
ON_
A)) NULL
(
(OPTI
ON_
B)) 10
(
(OPTI
ON_
C)) 4
(
(OPTI
ON_
D)) 15
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
) Whi
char
ethecor
rectar
rayi
nit
ial
i
zat
ionst
atement
s?

(
(OPTI
ON_
A)) i
ntA[
3]={
1,2,
3};

(
(OPTI
ON_
B)) i
ntA[
3]={
123}
;

(
(OPTI
ON_
C)) i
ntA[
3]=”
123”
;

(
(OPTI
ON_
D)) Al
l

(
(CORRECT_
C
HOI
CE)) A
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) Whi
ON) choft
hef
oll
owi
ngst
atement
sar
ewr
ongst
atement
s?

(
(OPTI
ON_
A)) Ar
rayi
spr
imi
ti
vedat
ast
ruct
ure.

(
(OPTI
ON_
B)) Ever
yel
ementofar
raymustbesame.

(
(OPTI
ON_
C)) I
nar
ray
,Inser
tel
ementi
scal
l
edpushoper
ati
on.

(
(OPTI
ON_
D)) Al
l

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
) Whi
char
etheappl
i
cat
ionsofar
ray
?
(
(OPTI
ON_
A)) Spar
semat
ri
x
(
(OPTI
ON_
B)) Or
der
edl
i
st
(
(OPTI
ON_
C)) Bot
ha&b
(
(OPTI
ON_
D)) none
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) Whi
ON) chamongthefoll
owingpai
rsofoper
ati
onsi
s
suppor
tedbyanarrayADT?
(
(OPTI
ON_ ) St
A) or
eandRetri
eve

(
(OPTI
ON_
B)) I
nser
tandDel
ete

(
(OPTI
ON_
C)) CopyandDel
ete

(
(OPTI
ON_
D)) AppendandCop
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) Thenumberofel
ON) ement
sinar
rayAr
ray
[1:
u]i
sgi
ven
by
(
(OPTI
ON_
A)) (
1-u)
(
(OPTI
ON_
B)) (
u)
(
(OPTI
ON_
C)) (
u–1+1)
(
(OPTI
ON_
D)) (
u–1-
1)
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
) Thenumberofel
ement
sinar
rayAr
ray
[l
1:u1,
l2:
u2]i
sgi
venby

(
(OPTI
ON_
A)) (
u1-
l1–1)
(u2–l
2-1)

(
(OPTI
ON_
B)) (
u1*
u2)

(
(OPTI
ON_
C)) (
u1–l
1)(
u2–l
2)

(
(OPTI
ON_
D)) (
u1-
l1+1)
(u2–l
2+1)

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) T
ON) henumberofel
givenby
ementsinar
rayAr
ray
[l1:
u1,
l2:
u2,
l3:
u3]i
s

(
(OPTI
ON_A)
) (u1-l
1–1)
(u2–l
2-1)(
u3–l3-
1)

(
(OPTI
ON_
B)) (
u1*
u2*
u3)

(
(OPTI
ON_
C)) (
u1–l
1)(
u2–l
2)(
u3-
l3)

(
(OPTI
ON_
D)) (
u1-
l1+1)
(u2–l
2+1)
(u3–l
3+1)

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) A
ON) none-
el
di
ement
s.
mensi
onal
arr
ayar
ray[
1:5]cont
ains_
___
___
__

(
(OPTI
ON_A)
) 5
(
(OPTI
ON_
B)) 4
(
(OPTI
ON_
C)) 1
(
(OPTI
ON_
D)) 6
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) At
ON) el
wo-
di
ement
mensi
s.
onal
arr
ayar
ray
[1:
3,1:
3]cont
ains_
___
___
__

(
(OPTI
ON_A)
) 3
(
(OPTI
ON_
B)) 6
(
(OPTI
ON_
C)) 9
(
(OPTI
ON_
D)) 7
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) I
ON) fthear
r
ofanar
r
ayi
sA[
ayhav
i
1:
10],whatwi
ngbaseaddr
l
lbetheaddr
ess100.
essofA[
5]el
ement

(
(OPTI
ON_A)
) 105
(
(OPTI
ON_
B)) 106
(
(OPTI
ON_
C)) 107
(
(OPTI
ON_
D)) 104
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) I
ON) ft
A[
hear
5,
r
ayi
2]el
sA[1:
10,
1:
ementofanar
5]
r
,__
__
ayhav
_
_
i
__
____wi
ll
bet
ngbaseaddr
headdr
ess100.
essof

(
(OPTI
ON_A)
) 120
(
(OPTI
ON_
B)) 121
(
(OPTI
ON_
C)) 122
(
(OPTI
ON_
D)) 123
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) I
ON) fthear
ofA[
1,
r
ayi
2,
sA[
3]el
1:5,
1:2,
1:3]
ementofanar
,
r
__
___
_
ayhav
_
i
__
___
wil
lbet
ngbaseaddr
headdr
ess
ess100.
(
(OPTI
ON_A)
) 102
(
(OPTI
ON_
B)) 104
(
(OPTI
ON_
C)) 105
(
(OPTI
ON_
D)) None
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) Spar
ON) semat
ri
xhav
e?

(
(OPTI
ON_
A)) manyzer
oent
ri
es

(
(OPTI
ON_
B)) manynon-
zer
oent
ri
es

(
(OPTI
ON_
C)) hi
gherdi
mensi
on

(
(OPTI
ON_
D)) noneofabov
e

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) At
ON) wodimensionalarr
ayTABLE[6][
8]isst
oredi
n
r
owmaj ororderwit
hbaseaddress351.
Whati
st headdressofTABLE[
3][4]
?
(
(OPTI
ON_
A)) 407
(
(OPTI
ON_
B)) 410
(
(OPTI
ON_
C)) 417
(
(OPTI
ON_
D)) None
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) Theext
ON) r
akeyi
nser
tedatt
heendoft
hear
rayi
s
cal
leda,
(
(OPTI
ON_
A)) Endkey
(
(OPTI
ON_
B)) St
opkey
.

(
(OPTI
ON_
C)) Sent
inel
.

(
(OPTI
ON_
D)) Tr
ansposi
ti
on
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
) Thel
argestel
ementofanar
rayi
ndexi
scal
l
edi
ts
(
(OPTI
ON_
A)) l
owerbound.
(
(OPTI
ON_
B)) r
ange
(
(OPTI
ON_
C)) upperbound.
(
(OPTI
ON_
D)) Al
loft
hese.
(
(CORRECT_
C
HOI
CE)) C
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI ) Whati
ON) stheout
putoft
hisCcode?

#incl
ude<st di
o.h>
voidmai n()
{
i
nta[2][3]={ 1,2,3,
4,5}
;
i
nti =0, j=0;
for(i=0; i<2; i
++)
for(j=0; j<3; j
++)
print
f("
%d" ,a[i
][
j]
);
}
(
(OPTI
ON_
A)) 123450
(
(OPTI
ON_
B)) 12345j
unk
(
(OPTI
ON_
C)) 123455
(
(OPTI
ON_
D)) Runt
imeer
ror

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI ) Whati
ON) stheout putoft
hisCcode?
#incl
ude<st di
o.h>
voidmai n()
{
i
nta[2][3]={ 1,2,3,
,4,
5};
i
nti =0, j=0;
for(i=0; i<2; i
++)
for(j=0; j<3; j
++)
print
f("
%d" ,a[i
][
j]
);
}
(
(OPTI
ON_ ) 123j
A) unk45

(
(OPTI
ON_
B)) Compi
l
eti
meer
ror

(
(OPTI
ON_
C)) 123045
(
(OPTI
ON_
D)) 123345
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI ) Whati
ON) st heoutputoft
hisCcode?
#include<st di
o.h>
voidf (
inta[]
[3]
)
{
a[0][
1]=3;
i
nti =0, j=0;
for(i=0; i<2; i
++)
for(j=0; j<3; j
++)
print
f("%d",a[i
][
j]
);
}
voidmai n()
{
i
nta[ 2][
3]={ 0};
f(a);
}
(
(OPTI
ON_ ) 030000
A)
(
(OPTI
ON_
B)) Junk3j
unkj
unkj
unkj
unk

(
(OPTI
ON_
C)) Compi
l
eti
meer
ror
(
(OPTI
ON_
D)) Al
lj
unkv
alues
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI ) Whati
ON) stheout putoft
hisCcode?
#include<st di
o.h>
voidf (
inta[]
[])
{
a[0][
1]=3;
i
nti =0, j=0;
for(i=0; i
<2; i++)
for(j=0; j
<3; j++)
print
f("%d",a[i
][
j]
);
}
voidmai n()
{
i
nta[ 2][
3]={ 0};
f(a);
}
(
(OPTI
ON_
A)) 030000
(
(OPTI
ON_
B)) Junk3j
unkj
unkj
unkj
unk
(
(OPTI
ON_
C)) Compi
l
eti
meer
ror

(
(OPTI
ON_
D)) Al
lj
unkv
alues

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) Commentont
ON) hef
oll
owi
ngst
atement
:
i
nt(*
a)[
7];
(
(OPTI
ON_
A)) Anar
ray“
a”ofpoi
nter
s.
(
(OPTI
ON_
B)) Apoi
nter“
a”t
oanar
ray
.

(
(OPTI
ON_
C)) Ar
aggedar
ray
.

(
(OPTI
ON_
D)) None
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) Commentont
ON) he2ar
ray
sregar
dingPandQ:
i
nt*a1[8];
i
nt*(a3[8]
);
P.Arrayofpoi
nter
s
Q.Pointert
oanarray
(
(OPTI
ON_ ) a1i
A) sP, a2isQ

(
(OPTI
ON_
B)) a1i
sP,
a2i
sP

(
(OPTI
ON_
C)) a1i
sQ,
a2i
sP
(
(OPTI
ON_
D)) a1i
sQ,
a2i
sQ

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) Whi
ON) choft
hefol
l
owi
ngi
snotpossi
blest
ati
cal
l
yin
C?
(
(OPTI
ON_ ) JaggedAr
A) ray

(
(OPTI
ON_
B)) Rect
angul
arAr
ray

(
(OPTI
ON_
C)) Cuboi
dal
Arr
ay
(
(OPTI
ON_
D)) Mul
ti
dimensi
onal
Arr
ay

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) Whatwi
ON) l
lhappenifi
naCprogram y
ouassigna
val
uetoanarrayel
ementwhosesubscr
iptexceeds
t
hesizeofarr
ay?
(
(OPTI
ON_
A)) Theel
ementwi
l
lbesett
o0.
(
(OPTI
ON_
B)) Thecompi
l
erwoul
drepor
taner
ror
(
(OPTI
ON_
C)) Thepr
ogram maycr
ashi
fsomei
mpor
tantdat
a
get
sover
writ
ten.
(
(OPTI
ON_
D)) Thear
raysi
zewoul
dappr
opr
iat
elygr
ow.
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) Whatdoest
ON) hef
oll
owi
ngdecl
arat
ionmean?
i
nt(*
ptr
)[10]
;
(
(OPTI
ON_
A)) pt
risar
rayofpoi
nter
sto10i
nteger
s
(
(OPTI
ON_
B)) pt
risapoi
ntert
oanar
rayof10i
nteger
s
(
(OPTI
ON_
C)) pt
risanar
rayof10i
nteger
s
(
(OPTI
ON_
D)) pt
risanpoi
ntert
oar
ray
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) I
ON) nCifyoupassanar
rayasanargumentt
oa
f
unct
ionwhatact
ual
l
ygetspassed?
(
(OPTI
ON_
A)) Val
ueofel
ement
sinar
ray
(
(OPTI
ON_
B)) Fi
rstel
ementoft
hear
ray
(
(OPTI
ON_
C)) Baseaddr
essoft
hear
ray
(
(OPTI
ON_
D)) Addr
essoft
hel
astel
ementofar
ray
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI ) Whatwi
ON) l
lbet
heout
putoft
hef
oll
owi
ngcode?
#i
ncl
ude<st
dio.
h>

i
ntmai n()
{
i
nta[5]={ 5,1,
15,20,25}
;
i
nti,j
,m;
i=++a[ 1]
;
j=a[1]++;
m =a[i++];
pri
ntf(
"%d, %d,%d"
,i,
j,m);
ret
urn0;
}

(
(OPTI
ON_
A)) 2,
1,15
(
(OPTI
ON_
B)) 1,
2,5
(
(OPTI
ON_
C)) 3,
2,15
(
(OPTI
ON_
D)) 2,
3,20
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)
Whatwi
l
lbet
heout
putoft
hepr
ogr
am?

#i
ncl ude<stdio.h>
i
ntmai n(
)
{
stati
cinta[ 2][2]={1,2,3,4};
i
nti ,j
;
stati
cint* p[]={ (i
nt*
)a,(i
nt*
)a+1,(i
nt*)
a+2}
;
for(i
=0;i<2;i++)
{
for(j
=0;j<2; j++)
{pr i
ntf(
"%d, %d,%d,%d\n",*(
*(p+i
)+j
),
*(
*(j+p)+i)
,*(*(i+p)+j)
,*(*
(p+j)
+i)
);
}
}
return0;
}

(
(OPTI
ON_
A)) 1,
1,1,
1
2,
3,2,
3
3,
2,3,
2
4,
4,4,
4
(
(OPTI
ON_
B)) 1,
2,1,
2
2,
3,2,
3
3,
4,3,
4
4,
2,4,
2
(
(OPTI
ON_
C)) 1,
1,1,
1
2,
2,2,
2
2,
2,2,
2
3,
3,3,
3
(
(OPTI
ON_
D)) 1,
2,3,
4
2,
3,4,
1
3,
4,1,
2
4,
1,2,
3
(
(CORRECT_
CH C
OI
CE))
(
A/B/C/
D)
(
(EXPLANATION
)
)(OPTIONAL)
(
MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)
Whatwi
l
lbet
heout
putoft
hepr
ogr
am ?

#include<st dio.h>
i
ntmai n( )
{
voidf un(int,i
nt [
])
;
intar r[]={ 1,2,3,4};
inti;
fun( 4, arr)
;
for(i=0; i
<4;i++)
pr intf("%d,",arr
[i
])
;
retur n0;
}
voidf un( intn, i
ntarr[
])
{
int* p=0;
inti=0;
whi le(i++<n)
p=&ar r[
i]
;
*p=0;
}

(
(OPTI
ON_
A)) 2,
3,4,
5
(
(OPTI
ON_
B)) 1,
2,3,
4
(
(OPTI
ON_
C)) 0,
1,2,
3
(
(OPTI
ON_
D)) 3,
2,10
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi l
lbetheoutputoft
hef
oll
owi
ngcode
#incl
ude<stdi
o.h>
voidfun(
int**
p);

i
ntmai n()
{
i
nta[ 3]
[4]={ 1,
2,3,4,
4,3,
2,8,
7,8,
9,0}
;
i
nt* ptr
;
ptr=&a[ 0][
0];
fun(&ptr);
return0;
}
v
oi dfun(i
nt* *p)
{
pri
ntf("
%d\ n",*
*p);
}

(
(OPTI
ON_
A)) 1
(
(OPTI
ON_
B)) 2
(
(OPTI
ON_
C)) 3
(
(OPTI
ON_
D)) 4
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi l
lbetheoutput
#i
nclude<stdi
o.h>
i
ntmai n()
{ stati
cintarr[
]={0,1,2,3,4}
;
i
nt*p[]={arr
,arr
+1,arr+2,ar
r+3,ar
r+4};
i
nt**ptr=p;
ptr
++;
pri
ntf(
"%d,%d,%d\n",
pt r
-p,*
ptr-
arr
,**pt
r);
*ptr
++;
pri
ntf(
"%d,%d,%d\n",
pt r
-p,*
ptr-
arr
,**pt
r);
*++ptr
;
pri
ntf(
"%d,%d,%d\n",
pt r
-p,*
ptr-
arr
,**pt
r);
++*ptr
;
pri
ntf(
"%d,%d,%d\n",
pt r
-p,*
ptr-
arr
,**pt
r);
ret
urn0;
}

(
(OPTI
ON_
A)) 0,
0,0
1,
1,1
2,
2,2
3,
3,3
(
(OPTI
ON_
B)) 1,
1,2
2,
2,3
3,
3,4
4,
4,1
(
(OPTI
ON_
C)) 1,
1,1
2,
2,2
3,
3,3
3,
4,4
(
(OPTI
ON_
D)) 0,
1,2
1,
2,3
2,
3,4
3,
4,5
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whi
chofthefoll
owingi
scor
rectwayt
odef
inet
he
f
unct
ionf
un()inthebel
owprogr
am?

#i
nclude<st
dio.
h>
i
ntmai n(
)
{
i
nta[3]
[4]
;
f
un(a);
r
eturn0;
}

(
(OPTI
ON_
A)) v
oidf
un(
intp[
][
4])

(
(OPTI
ON_
B)) v
oidf
un(
int*
p[4]
)

(
(OPTI
ON_
C)) v
oidf
un(
int*
p[]
[4]
)

(
(OPTI
ON_
D)) v
oidf
un(
int*
p[3]
[4]
)

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whichoft
hefoll
owingstat
ement
sar
ecor
rect
aboutt
heprogr
am below?

#i
ncl
ude<st
dio.
h>

i
ntmai n( )
{
i
ntsi ze,i
;
scanf (
"%d",&size);
i
ntar r[
size]
;
for(
i=1;i<=si
ze; i
++)
{
scanf (
"%d",arr[
i]
);
printf
("%d",arr
[i
]);
}
ret
urn0;
}

(
(OPTI
ON_
A)) Thecodei
serr
oneoussi
ncethesubscri
ptf
orar
ray
nf
usedi orl
oopisi
ntherange1tosize.
(
(OPTI
ON_
B)) Thecodei
serroneoussincet
heval
uesofar
rayar
e
get
ti
ngscannedthroughthel
oop.
(
(OPTI
ON_
C)) Thecodei
serroneoussincet
hest
atement
decl
ari
ngar
rayisinval
i
d
(
(OPTI
ON_
D)) Thecodei
scor
rectandr
unssuccessf
ull
y
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)
Whichofthef
oll
owi
ngstatement
sar
ecor
rect
about6usedi
ntheprogr
am?
i
ntnum[6];
num[6]
=21;

(
(OPTI
ON_
A)) Inthefir
ststatement6specif
iesapart
icul
ar
element,whereasinthesecondstat
ementit
specif
iesatype
(
(OPTI
ON_
B)) I
nthef i
rststat
ement6specif
iesaarraysi
ze,
whereasinthesecondstat
ementitspecif
iesa
par
ti
cularelementofar
ray.
(
(OPTI
ON_
C)) Inthefir
ststatement6specif
iesapart
icul
ar
element,whereasinthesecondstat
ementit
specif
iesaar r
aysize.
(
(OPTI
ON_
D)) I
nbot
hthest
atement6speci
fi
esar
raysi
ze
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whichofthefol
l
owi
ngst
atement
sar
ecor
rect
aboutanarr
ay?

1Thear rayintnum[26]
;canstor
e26el ement s.
2Theexpr essionnum[1]desi
gnatesthev er
yf i
rst
elementi nthearr
ay.
3Itisnecessarytoini
ti
ali
zethearrayatthetimeof
declarati
on.
4Thedecl aratonnum[
i SIZE]i
sall
owedi fSIZEisa
macr o.

(
(OPTI
ON_
A)) 1
(
(OPTI
ON_
B)) 1,
4
(
(OPTI
ON_
C)) 2,
3
(
(OPTI
ON_
D)) 2,
4
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Ifxi
sonedimensi
onalar
ray
,thenpi
ckupt
he
corr
ectanswer
(
(OPTI
ON_
A)) *(x+i)i
ssameas&x[i
]

(
(OPTI
ON_
B)) *
&x[
i]i
ssameasx+i

(
(OPTI
ON_
C)) *
(x+i
)issameasx[
i]+1

(
(OPTI
ON_
D)) *
(x+i
)issameas*
x[i
]

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Considerthefoll
owi
ngcodesegment:
i
nta[10],*
p1, *
p2;
p1=&a[ 4]
;
p2=&a[ 6]
;
Whichofthef ol
lowi
ngstat
ementsi
sincor
rect
w.r
.t.poi
nters?
(
(OPTI
ON_
A)) p1+2
(
(OPTI
ON_
B)) p2–2
(
(OPTI
ON_
C)) p2+p1
(
(OPTI
ON_
D)) p2–p1
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi l
lbetheoutputofthef
oll
owingcode
segment?
main(){
chars[
10];
str
cpy(s,“
abc”)
;
pri
ntf
(“%d%d” ,
str
len(
s),si
zeof
(s)
);
}
(
(OPTI
ON_
A)) 310
(
(OPTI
ON_
B)) 33
(
(OPTI
ON_
C)) 103
(
(OPTI
ON_
D)) 1010
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi l
lbet heout putofthef
oll
owi
ngcodeseg
ment,i
fany ?
myfunc(st ructtestt){
st
rcpy(t
.s,“world”);
}
main(){
st
ructtest{chars[ 10];}t
;
st
rcpy(t
.s,“Hell
o” )
;
pr
intf
(“%s”,t.s)
;
myfunc(t)
;
pr
intf
(“%s”,t.s)
;
}
(
(OPTI
ON_
A)) Hell
oHel l
o

(
(OPTI
ON_
B)) wor
ldwor
ld

(
(OPTI
ON_
C)) Hel
l
owor
ld

(
(OPTI
ON_
D)) t
hepr
ogr
am wi
l
lnotcompi
l
e
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whati stheoutputofthef oll


owingCpr
ogr
am?
#incl ude<stdio.
h>
mai n()
{
i
nta, b=0;
staticintc[10]={
1,2,
3,
4,5,6,7,
8,9,
0};
for( a=0;a<10;
++a)
i
f( (c[a]
%2) ==0)b+=c[ a];
printf(“%d”,b)
;
}
(
(OPTI
ON_
A)) 20
(
(OPTI
ON_
B)) 25
(
(OPTI
ON_
C)) 45
(
(OPTI
ON_
D)) 90
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Themaxi
mum numberofdi
mensi
onsanar
raycan
havei
nCis
(
(OPTI
ON_
A)) 3
(
(OPTI
ON_
B)) 4
(
(OPTI
ON_
C)) 5
(
(OPTI
ON_
D)) compi
l
erdependent

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Thesi
zeofar
rayi
nta[
5]={
1,2}i
s
(
(OPTI
ON_
A)) 4
(
(OPTI
ON_
B)) 12
(
(OPTI
ON_
C)) 10
(
(OPTI
ON_
D)) 6
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Theoutputoft hefol
lowingstat
ement
sis
charch[6]
={‘e’
,‘
n’,
‘d’
,‘\
0’,‘
p’
};
pri
ntf
(“%s”,ch);
(
(OPTI
ON_
A)) endp
(
(OPTI
ON_
B)) end0p
(
(OPTI
ON_
C)) end
(
(OPTI
ON_
D)) er
ror
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Todeclareanar
raySthathol
dsa5-
char
act
erst
ri
ng,youwouldwri
te
(
(OPTI
ON_
A)) charS[5]

(
(OPTI
ON_
B)) St
ri
ngS[
5]

(
(OPTI
ON_
C)) charS[
6]

(
(OPTI
ON_
D)) St
ri
ngS[
6]
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) Whi
ON) chofthef
oll
owi
ngexpressi
onsaccessesthe
(
i,
j)
thentr
yofan(m xn)matri
xstor
edincolumn
majorf
orm?
(
(OPTI
ON_
A)) nx(
i-
1)+j
(
(OPTI
ON_
B)) m x(
n-j
)+j
(
(OPTI
ON_
C)) m x(
j-
1)+i
(
(OPTI
ON_
D)) nx(
m-i
)+j
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) Amat
ON) hemati
cal-
model
wit
hacoll
ect
ionof
oper
ati
onsdef
inedont
hatmodel
iscal
led
(
(OPTI
ON_
A)) Dat
aSt
ruct
ure
(
(OPTI
ON_
B)) Abst
ractDat
aTy
pe
(
(OPTI
ON_
C)) Pr
imi
ti
veDat
aTy
pe
(
(OPTI
ON_
D)) Al
gor
it
hm
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) AnADTi
ON) sdefi
nedtobeamat hemat
ical
modelofa
user-
defi
nedtypealongwit
hthecoll
ecti
onofal
l
____
____
____operat
ionsonthatmodel
(
(OPTI
ON_
A)) Car
dinal
i
ty
(
(OPTI
ON_
B)) Assi
gnment
(
(OPTI
ON_
C)) Pr
imi
ti
ve
(
(OPTI
ON_
D)) St
ruct
ured
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) Repr
ON) esent
ati
onofdat
ast
ruct
urei
nmemor
yis
knownas
(
(OPTI
ON_
A)) Recur
siv
e
(
(OPTI
ON_
B)) Abst
ractdat
aty
pe
(
(OPTI
ON_
C)) St
oragest
ruct
ure
(
(OPTI
ON_
D)) Fi
l
est
ruct
ure
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whati
sri
ghtwayt
oini
ti
ali
zear
ray
?
(
(OPTI
ON_
A))
i
ntnum[
6]={2,
4,12,
5,45,
5};

(
(OPTI
ON_
B)) i
ntn{
}={2,
4,12,
5,45,
5};
(
(OPTI
ON_
C)) i
ntn{
6}={2,
4,12}
;
(
(OPTI
ON_
D))
i
ntn(
6)={2,
4,12,
5,45,
5};

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi l
lbetheoutputoft
hepr
ogr
am ?
#include<stdi
o.h>
voidmai n()
{
inta[5]={5,1,15,
20,25}
;
inti,j
,m;
i=++a[ 1];
j=a[ 1]
++;
m =a[ i
++];
printf
("%d,%d,%d",i
,j
,m);
}
(
(OPTI
ON_
A)) 3,
2,15
(
(OPTI
ON_
B)) 2,
3,20
(
(OPTI
ON_
C))
2,
1,15

(
(OPTI
ON_
D))
1,
2,5

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi ll
bet heout putoffol
l
owingprogr
am code?
#i
nclude<st dio.h>
i
ntmai n(void)
{
charp;
charbuf[10]={ 1,2,3,4,
5,6,9,
8};
p=( buf+1) [5];
pri
ntf(
"%d" ,
p) ;
ret
urn0;
}
(
(OPTI
ON_
A)) 5
(
(OPTI
ON_
B)) 6
(
(OPTI
ON_
C)) 9
(
(OPTI
ON_
D)) er
ror
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Letxbeanarr
ay.Whi
choft
hef
oll
owi
ngoper
ati
ons
areill
egal
?
I.++x
II
.x+1
II
I.x++
IV.x *
2
(
(OPTI
ON_
A)) IandI
I
(
(OPTI
ON_
B))
I
,I
IandI
II

(
(OPTI
ON_
C)) I
IandI
II
(
(OPTI
ON_
D)) I
,I
IIandI
V
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Anar
rayel
ementsareal
way
sst
oredi
n__
___
___
memoryl
ocat
ions.
(
(OPTI
ON_
A))
Sequent
ial

(
(OPTI
ON_
B)) Random
(
(OPTI
ON_
C))
Sequent
ial
andRandom

(
(OPTI
ON_
D)) Noneoft
heabov
e
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Si
zeoft
hear
rayneednotbespeci
fi
ed,
when
(
(OPTI
ON_
A)) I
nit
ial
i
zat
ioni
sapar
tofdef
ini
ti
on
(
(OPTI
ON_
B)) I
tisadecl
arat
ri
on
(
(OPTI
ON_
C)) I
tisaf
ormal
par
amet
er
(
(OPTI
ON_
D)) Al
loft
hese
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Considert hefoll
owingty
pedef
ini
ti
on.
typedefcharx[ 10];
xmy Array[5];
Whatwi llsizeof(
my Ar
ray
)be?(Assumeone
characteroccupi es1byt
e)
(
(OPTI
ON_
A)) 15
(
(OPTI
ON_
B)) 10
(
(OPTI
ON_
C)) 50
(
(OPTI
ON_
D)) 30
(
(CORRECT_
C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwillbepri
ntedaft
erexecut
ionoft
hef
oll
owi
ng
code?
voi
dmai n()
{
i
ntarr[
10]={1,
2,3,
4,
5};
pr
int
f("
%d",arr
[5]
);
}
(
(OPTI
ON_
A)) Gar
bageVal
ue
(
(OPTI
ON_
B)) 5
(
(OPTI
ON_
C)) 6
(
(OPTI
ON_
D)) 0
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwillbetheout putoft
hef
oll
owi
ngpr
ogr
am?
voi
dmain( )
{
charstr1[]="abcd";
charstr2[]="abcd";
if(
str
1==st r2)
pri
ntf("Equal
");
else
pri
ntf("Unequal"
);
}
(
(OPTI
ON_
A))
Equal

(
(OPTI
ON_
B)) Unequal
(
(OPTI
ON_
C))
Er
ror

(
(OPTI
ON_
D)) Noneoft
hese
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwillbetheoutputofthefol
l
owi
ngcode?
voi
dmai n()
{
inta[
10];
print
f("
%d%d" ,a[
-1]
,a[12]
);
}
(
(OPTI
ON_
A)) 00
(
(OPTI
ON_
B))
Gar
bagev
alue0

(
(OPTI
ON_
C)) 0Gar
bageVal
ue
(
(OPTI
ON_
D))
Gar
bagev
alueGar
bageVal
ue

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatdoesthef
oll
owi
ngdecl
arat
ionmean?
i
nt(*
ptr
)[10]
;
(
(OPTI
ON_
A)) pt
risar
rayofpoi
nter
sto10i
nteger
s
(
(OPTI
ON_
B))
pt
risapoi
ntert
oanar
rayof10i
nteger
s

(
(OPTI
ON_
C))
pt
risanar
rayof10i
nteger
s

(
(OPTI
ON_
D)) pt
risanpoi
ntert
oar
ray
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Ar
raypassedasanar
gumentt
oaf
unct
ioni
s
i
nter
pret
edas
(
(OPTI
ON_
A))
Addr
essoft
hear
ray
.

(
(OPTI
ON_
B)) Val
uesoft
hef
ir
stel
ement
soft
hear
ray
(
(OPTI
ON_
C))
Addr
essoft
hef
ir
stel
ementoft
hear
ray
.

(
(OPTI
ON_
D))
Numberofel
ementoft
hear
ray
.

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi l
lbetheoutputoftheprogr
am ifthear
ray
beginsat65472andeachi nt
egeroccupies2
bytes?
#include
voidmai n()
{
inta[3]
[4]={1,
2,3,4,4,3,2,1,7,
8,9,0};
printf
("%u,%u"
,a+1,&a+1);
}
(
(OPTI
ON_
A)) 65474,
65488
(
(OPTI
ON_
B))
65480,
65488

(
(OPTI
ON_
C))
65480,
65496

(
(OPTI
ON_
D))
65474,
65476

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi l
lbetheoutputoft
hepr
ogr
am ?
#i
nclude
i
ntmai n()
{
i
ntarr[
1]={10};
pri
ntf(
"%d"
,0[ar
r]
);
ret
urn0;
}
(
(OPTI
ON_
A)) 1
(
(OPTI
ON_
B)) 0
(
(OPTI
ON_
C)) 10
(
(OPTI
ON_
D)) 6
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi l
lbetheoutputoftheprogr
am i
fthear
ray
beginsataddr ess65486?
#include
voidmai n()
{
intarr[
]={12,14,15,23,45}
;
printf
("%u,%u",ar
r,&ar
r);
}
(
(OPTI
ON_
A))
65486,
65488

(
(OPTI
ON_
B)) 65486,
65490
(
(OPTI
ON_
C))
65486,
65487

(
(OPTI
ON_
D))
65486,
65486

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi l
lbetheoutputoft heprogram?
#incl
ude
voidmain()
{
fl
oatarr[
]={12.4,
2.3,4.5,6.7}
;
pri
ntf
("%d",
sizeof
(arr
)/sizeof(
arr
[0]
))
;
}
(
(OPTI
ON_
A)) 5
(
(OPTI
ON_
B)) 4
(
(OPTI
ON_
C)) 6
(
(OPTI
ON_
D)) 7
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whi chofthef oll


owingi
scor
rectwayt
odef
inet
he
functionfun()inthebel
owprogr
am?
#include<stdi
o.h>
voidmai n()
{
inta[3]
[4];
fun(a);
}
(
(OPTI
ON_
A))
v
oidf
un(
intp[
][
4])
{}

(
(OPTI
ON_
B))
v
oidf
un(
int*
p[4]
){
}

(
(OPTI
ON_
C))
v
oidf
un(
int*
p[]
[4]
){
}

(
(OPTI
ON_
D))
v
oidf
un(
int*
p[3]
[4]
){
}

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whichoft hef ol
lowingstatementsarecorrect
aboutanar ray?
1.Thearrayi ntnum[ 26]
;canstor
e26el ement s.
2.Theexpr essionnum[ 1]desi
gnatesthev er
yf i
rst
el
ementint hearray.
3.I
tisnecessar yt oini
ti
ali
zethearrayatthetimeof
decl
arat
ion.
4.Thedecl arati
onnum[ SIZE]i
sall
owedi fSIZEisa
macro.
(
(OPTI
ON_
A)) 1
(
(OPTI
ON_
B)) 1,
4
(
(OPTI
ON_
C)) 2,
3
(
(OPTI
ON_
D)) 2,
4
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whi choft hefollowingstat


ement
sar
ecor
rect
aboutt hepr ogram below?
#include<st dio.h>
voidmai n()
{
intsi ze,i;
scanf (
"%d" ,
&si ze);
intar r[
size];
for (
i=1;i<=size; i
++)
{
scanf ("
%d" ,arr[
i]
);
printf
("%d", arr
[i
]);
}
}
(
(OPTI
ON_
A)) Thecodei
serroneoussincet
hest
atement
decl
ari
ngar
rayisinval
i
d.
(
(OPTI
ON_
B)) Thecodei
serr
oneoussi
ncethesubscri
ptf
orar
ray
usedi
nforl
oopisi
ntherange1tosize
(
(OPTI
ON_
C)) Thecodei
scor
rectandr
unssuccessf
ull
y
(
(OPTI
ON_
D))
Thecodei
serroneoussincet
heval
uesofar
rayar
e
get
ti
ngscannedthroughthel
oop.

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whichoft
hef
oll
owingcor
rect
lyaccessesthe
sevent
hel
ementst
oredi
narr,
anar r
aywith100
el
ements?
(
(OPTI
ON_
A))
ar
r[
6]

(
(OPTI
ON_
B)) ar
r[
7]
(
(OPTI
ON_
C))
ar
r{6}

(
(OPTI
ON_
D))
ar
r{7}

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

i
nta[
5]={1,
2,
3}
Whati
stheval
ueofa[
4]?
(
(OPTI
ON_
A)) 3
(
(OPTI
ON_
B)) 1
(
(OPTI
ON_
C)) 2
(
(OPTI
ON_
D)) 0
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwil
lbeout
putwheny
ouwi
l
lexecut
efol
l
owi
ng
ccode?
#incl
ude<stdio.h>
voidmain(){
chararr[
7]="Networ
k";
pri
ntf
("%s",ar
r);
}
Chooseal l
thatapply:
(
(OPTI
ON_
A)) Net
wor
k
(
(OPTI
ON_
B)) N
(
(OPTI
ON_
C)) Gar
bagev
alue
(
(OPTI
ON_
D)) Compi
l
ati
oner
ror
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

#incl
ude<stdi
o.h>
voidmain(){
chararr[
11]="
TheAf
ri
canQueen"
;
pri
ntf
("%s",
arr
);
}
(
(OPTI
ON_
A)) TheAf
ri
canQueen
(
(OPTI
ON_
B)) The
(
(OPTI
ON_
C)) TheAf
ri
can
(
(OPTI
ON_
D)) Compi
l
ati
oner
ror
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi l
lbeout putwheny ouwill
execut
efoll
owi
ng
ccode?
#include<stdio.
h>
voidmai n()
{
intconstSI ZE=5;
intexpr;
doublev alue[SIZE]={
2.0,
4.0,
6.0,
8.0,
10.
0};
expr=1|2|3|4;
printf
("%f",
value[expr
]);
}
(
(OPTI
ON_
A)) 2.
000000
(
(OPTI
ON_
B)) 4.
000000
(
(OPTI
ON_
C)) 8.
000000
(
(OPTI
ON_
D)) Compi
l
ati
oner
ror
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi ll
beout putwheny ouwillexecutefol
lowi
ng
ccode?
#include<stdi
o.h>
enum power {
Dalai,
Vladimi r
=3,
Bar ack,
Hill
ar y
};
voidmai n(){
fl
oatl eader[
Dalai+Hil
lary
]={1.
f,2.
f,
3.f,
4.f
,5.
f}
;
enum powerp=Bar ack;
pri
nt f(
"%0.f
",
leader[p>>1+1]);
}
(
(OPTI
ON_
A)) 1
(
(OPTI
ON_
B)) 2
(
(OPTI
ON_
C)) 3
(
(OPTI
ON_
D)) Compi
l
ati
oner
ror
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi l
lbeout putwheny ouwil
lexecutefol
l
owi
ng
ccode?
#incl
ude<stdi
o.h>
voidmain(){
chardata[
2][
3][2]={
0,1,
2,3,
4,
5,
6,
7,8,
9,10,
11};
pri
ntf
("%o",
data[0][
2][
1])
;
}
(
(OPTI
ON_
A)) 5
(
(OPTI
ON_
B)) 6
(
(OPTI
ON_
C)) 7
(
(OPTI
ON_
D)) Compi
l
ati
oner
ror
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi llbeout putwhenyouwi ll


executef
oll
owi
ng
ccode?
#incl
ude<st di
o.h>
voidmai n()
{
shortnum[ 3]
[2]={3,
6,
9,
12,15,18}
;
print
f("
%d%d" ,
*(num+1)[
1],
**(num+2));
}
(
(OPTI
ON_
A)) 1218
(
(OPTI
ON_
B)) 1818
(
(OPTI
ON_
C)) 1515
(
(OPTI
ON_
D)) 1215
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi l
lbeout putwheny ouwil
lexecut
efol
l
owi
ng
ccode?
#include<stdi
o.h>
voidmai n()
{
intarray[
2][
3]={5,10,15,
20,25,
30}
;
int(*ptr
)[
2][
3]=&ar ray;
printf
("%d\t
",
** *
pt r
);
printf
("%d\t
",
** *
(ptr+1))
;
printf
("%d\t
",
** (
*ptr+1))
;
printf
("%d\t
",
*(*(*ptr+1)
+2) )
;
}
(
(OPTI
ON_
A)) 5Gar
bage2030
(
(OPTI
ON_
B)) 10153020
(
(OPTI
ON_
C)) 5152030
(
(OPTI
ON_
D)) Compi
l
ati
oner
ror
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi l
lbeout putwheny ouwil
lexecutefol
l
owing
ccode?
#include<stdio.h>
voidmai n(){
intarr[
][3]
={{1,2},
{3,
4,
5},
{5}}
;
printf
("%d%d%d" ,
si
zeof(ar
r),
arr
[0]
[2]
,
arr[
1][
2])
;
}
(
(OPTI
ON_
A)) 1235
(
(OPTI
ON_
B)) 1805
(
(OPTI
ON_
C)) 1205
(
(OPTI
ON_
D)) 1835
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whati
stheout
putoft
hisCcode?

1. #include<stdio.h>
2. voidmai n()
3. {
4. inta[2]
[3]={ 1,2,3,
4,5}
;
5. inti=0, j=0;
6. for(i=0; i<2; i
++)
7. for(j=0; j<3; j
++)
8. printf
("%d",a[i
][
j]
);
9. }
(
(OPTI
ON_
A)) 123450
(
(OPTI
ON_
B)) 12345j
unk
(
(OPTI
ON_
C)) 123455
(
(OPTI
ON_
D))
Runt
imeer
ror

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whati
stheout
putoft
hisCcode?

1. #include<stdio.h>
2. voidmai n()
3. {
4. inta[2]
[3]={ 1,2,3,
,4,
5};
5. inti=0, j=0;
6. for(i=0; i<2; i
++)
7. for(j=0; j<3; j
++)
8. printf
("%d",a[i
][
j]
);
9. }
(
(OPTI
ON_
A)) 123j
unk45
(
(OPTI
ON_
B)) Compi
l
eti
meer
ror
(
(OPTI
ON_
C)) 123045
(
(OPTI
ON_
D))
123345

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whati
stheout
putoft
hisCcode?

1. #include<stdio.h>
2. voidf (
inta[]
[3]
)
3. {
4. a[0][
1]=3;
5. inti=0, j=0;
6. for(i =0;i<2; i
++)
7. for(j =0;j<3; j
++)
8. printf(
"%d",a[
i][
j]
);
9. }
10. voidmai n()
11. {
12. i
nta[2][
3]={0};
13. f(
a);
14. }
(
(OPTI
ON_
A)) 030000
(
(OPTI
ON_
B)) Junk3j
unkj
unkj
unkj
unk
(
(OPTI
ON_
C)) Compi
l
eti
meer
ror
(
(OPTI
ON_
D)) Al
lj
unkv
alues

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Commentonthef
oll
owi
ngst
atement
:
i
nt(
*a)
[7]
;
(
(OPTI
ON_
A)) Anar
ray“
a”ofpoi
nter
s.
(
(OPTI
ON_
B)) Apoi
nter“
a”t
oanar
ray
.
(
(OPTI
ON_
C)) Ar
aggedar
ray
(
(OPTI
ON_
D)) Noneoft
hement
ioned
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi
l
lbet
heout
putoft
hispr
ogr
am?

1. #include<st dio.h>
2. usingnamespacest d;
3. intarray1[]={ 1200, 200,2300,1230,
1543}
;
4. intarray2[]={ 12, 14,16,18,20}
;
5. inttemp, r
esult=0;
6. intmai n()
7. {
8. for(temp=0; temp<5; temp++){
9. r
esul t+=ar ray1[temp];
10. }
11. for(temp=0; temp<4; t
emp++){
12. result+=ar ray2[
temp];
13. }
14. cout<<r esul t
;
15. retur
n0;
16. }
(
(OPTI
ON_
A)) 6553

(
(OPTI
ON_
B)) 6533
(
(OPTI
ON_
C)) 6522

(
(OPTI
ON_
D)) 12200

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi
l
lbet
heout
putoft
hispr
ogr
am?

1. #include<stdio.h>
2. usingnamespacest d;
3. intmai n()
4. {
5. intarray[
]={ 0,2,4,6,7,
5,3}
;
6. intn,resul
t=0;
7. for(n=0; n<8; n++){
8. result+=ar ray[
n];
9. }
10. cout<<r esult;
11. retur
n0;
12. }
(
(OPTI
ON_
A)) 25
(
(OPTI
ON_
B)) 26
(
(OPTI
ON_
C)) 27
(
(OPTI
ON_
D)) None
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whati
stheout
putoft
hispr
ogr
am?

1. #include<stdi
o.h>
2. usingnamespacest d;
3. i
ntmai n(
)
4. {
5. inta=5, b=10, c=15;
6. intarr[
3]={&a,&b,&c}
;
7. cout<<* arr
[*ar
r[
1]-8]
;
8. return0;
9. }
(
(OPTI
ON_
A)) 15
(
(OPTI
ON_
B)) 18
(
(OPTI
ON_
C)) gar
bagev
alue
(
(OPTI
ON_
D)) compi
l
eti
meer
ror
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whati
stheout
putoft
hispr
ogr
am?

1. #incl
ude<stdio.
h>
2. usingnamespacestd;
3. i
ntmai n(
)
4. {
5. charst
r[5]="ABC"
;
6. cout<<str[
3];
7. cout<<str;
8. ret
urn0;
9. }
(
(OPTI
ON_
A)) ABC
(
(OPTI
ON_
B)) ABCD
(
(OPTI
ON_
C)) AB
(
(OPTI
ON_
D)) Noneoft
hement
ioned
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whati
stheout
putoft
hispr
ogr
am?

1. #include<stdio.h>
2. usingnamespacest d;
3. i
ntmai n()
4. {
5. intarray[
]={ 10,20,30}
;
6. cout<<- 2[ar
r ay
];
7. return0;
8. }
(
(OPTI
ON_
A)) 15
(
(OPTI
ON_
B)) 20
(
(OPTI
ON_
C)) compi
l
eti
meer
ror
(
(OPTI
ON_
D)) gar
bagev
alue
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whati
stheout
putoft
hispr
ogr
am?

1. #include<iost
ream>
2. usingnamespacest d;
3. i
ntmai n(
)
4. {
5. i nta[2]
[4]={3,6,
9,12,
15,18,
21,
24};
6. cout<<* (a[
1]+2)<<*(*
(a+1)+2)<<
2[
1[a]]
;
7. r eturn0;
8. }
(
(OPTI
ON_
A)) 151821
(
(OPTI
ON_
B)) 212121
(
(OPTI
ON_
C)) 242424
(
(OPTI
ON_
D)) Compi
l
eti
meer
ror
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whati
stheout
putoft
hispr
ogr
am?

1. #include<iostream>
2. usingnamespacest d;
3. intmai n()
4. {
5. i nti;
6. char* arr
[]={"C"
,"C++"
,"Jav
a",
"VBA"
};
7. char* (*
ptr)
[4]=&arr;
8. cout<<++( *ptr)
[2]
;
9. r eturn0;
10. }
(
(OPTI
ON_
A)) av
a
(
(OPTI
ON_
B)) j
ava
(
(OPTI
ON_
C)) C++
(
(OPTI
ON_
D)) compi
l
eti
meer
ror
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whati
stheout
putoft
hispr
ogr
am?

1. #include<iost
ream>
2. usingnamespacest d;
3. i
ntmai n(
)
4. {
5. intarr[
]={4,5,6,7};
6. int*p=( ar
r+1) ;
7. cout<<* p;
8. return0;
9. }
(
(OPTI
ON_
A)) 4
(
(OPTI
ON_
B)) 5
(
(OPTI
ON_
C)) 6
(
(OPTI
ON_
D)) 7
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whati
stheout
putoft
hispr
ogr
am?

1. #include<iostr
eam>
2. usingnamespacest d;
3. i
ntmai n(
)
4. {
5. intarr[
]={4,5,6,7};
6. int*p=( ar
r+1) ;
7. cout<<ar r;
8. return0;
9. }
(
(OPTI
ON_
A)) 4
(
(OPTI
ON_
B)) 5
(
(OPTI
ON_
C)) Addr
essofar
r
(
(OPTI
ON_
D)) 7
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whati
stheout
putoft
hispr
ogr
am?

1. #include<iostr
eam>
2. usingnamespacest d;
3. intmai n()
4. {
5. i ntnumber s[
5];
6. i nt*p;
7. p=number s;*p=10;
8. p++;* p=20;
9. p=&number s[2]
;* p=30;
10. p=number s+3;* p=40;
11. p=number s;*(p+4)=50;
12. for(i
ntn=0; n<5;n++)
13. cout<<number s[
n]<<",
";
14. ret
urn0;
15. }
(
(OPTI
ON_
A)) 10,
20,
30,
40,
50,
(
(OPTI
ON_
B)) 1020304050
(
(OPTI
ON_
C)) compi
l
eer
ror
(
(OPTI
ON_
D)) r
unt
imeer
ror
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whati
stheout
putoft
hispr
ogr
am?

1. #include<iostream>
2. usingnamespacest d;
3. i
ntmai n()
4. {
5. i
ntar r[
]={4,5,6,7}
;
6. i
nt* p=( ar
r+1) ;
7. cout<<* arr+9;
8. return0;
9. }
(
(OPTI
ON_
A)) 12
(
(OPTI
ON_
B)) 5
(
(OPTI
ON_
C)) 13
(
(OPTI
ON_
D)) Er
ror
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Tot
rav
erseanar
raymeans
(
(OPTI
ON_
A)) Topr
ocesseachel
ementi
nar
ray
(
(OPTI
ON_
B)) Todel
eteel
ementf
rom ar
ray
(
(OPTI
ON_
C)) Toi
nser
tel
ementi
ntoanar
ray
(
(OPTI
ON_
D)) Tocombi
net
woar
ray
sint
osi
ngl
ear
ray
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Mer
gingr
efer
sto
(
(OPTI
ON_
A)) I
nser
ti
ngel
ement
sint
oanar
ray
(
(OPTI
ON_
B)) Pr
ocessi
ngel
ement
sofanar
ray
(
(OPTI
ON_
C)) Combi
ningt
woar
ray
sint
oasi
ngl
ear
ray
(
(OPTI
ON_
D)) Del
eti
ngel
ement
sfr
om anar
ray
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Sor
ti
ngofanar
rayr
efer
sto
(
(OPTI
ON_
A)) Pr
ocessi
ngel
ement
sofanar
ray
(
(OPTI
ON_
B)) Del
eti
ngel
ement
sfr
om anar
ray
(
(OPTI
ON_
C)) Bot
hAandB
(
(OPTI
ON_
D)) Or
gani
zi
ngel
ement
sinanar
rayi
nsomeor
der
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Patt
ernmatchi
ngistheprocessto
(
(OPTI
ON_
A)) Checkifonest
ri
ngispresentint
heanot
herst
ri
ng

(
(OPTI
ON_
B)) Checki
ftwost
ri
ngsar
eofsamel
engt
h

(
(OPTI
ON_
C)) Tochecki
ftwost
ri
ngsar
eident
ical

(
(OPTI
ON_
D)) Tocomparetwostr
ingst
oknowt
hecountof
si
mil
archar
acter
s
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Thelengt
hofast
ri
ngi
sthet
otal
numberof
char
acter
s
(
(OPTI
ON_
A)) oft
hest
ri
ngexcl
udi
ngbl
ankspace
(
(OPTI
ON_
B)) i
nthest
ri
ng
(
(OPTI
ON_
C)) Whi
char
erepeat
edi
nthest
ri
ng
(
(OPTI
ON_
D)) Noneoft
heabov
e
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Tocopyonest
ringi
ntoanot
hermeans
(
(OPTI
ON_
A)) Toaddonestr
ingatt
heendofanotherst
ri
ng

(
(OPTI
ON_
B)) Tocr
eat
enewst
ri
ng

(
(OPTI
ON_
C)) Tocopyt
het
argetst
ri
ngt
othesour
cest
ri
ng

(
(OPTI
ON_
D)) Tocopyt
hesour
cest
ri
ngt
otar
getst
ri
ng

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Toconcat
enat
east
ri
ngmeans
(
(OPTI
ON_
A)) Tocopyonest
ri
ngt
oanot
her
(
(OPTI
ON_
B)) Toaddonest
ri
ngatt
heendoft
heot
her
(
(OPTI
ON_
C)) Toaddonest
ri
ngatt
hebegi
nni
ngofot
her
(
(OPTI
ON_
D)) Toform anewstri
ngcont
aini
nguni
quechar
act
ers
fr
om boththest
ri
ngs.
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

The‘
\0’
char
act
ersi
ndi
cat
es
(
(OPTI
ON_
A)) Wher
ethest
ri
ngbegi
ns
(
(OPTI
ON_
B)) Wher
ethest
ri
ngends
(
(OPTI
ON_
C)) Thest
ri
ngi
sempt
y
(
(OPTI
ON_
D)) Thel
engt
hofast
ri
ng
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Amat
ri
xiscal
l
edwhen
(
(OPTI
ON_
A)) Mostofi
tsel
ement
sar
ezer
o
(
(OPTI
ON_
B)) Mostofi
tsel
ement
sar
enonzer
o
(
(OPTI
ON_
C)) Al
lofi
tsel
ement
sar
enonzer
o
(
(OPTI
ON_
D)) Noneofabov
e
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Aspar
semat
ri
xcanbel
owert
ri
angul
armat
ri
x
(
(OPTI
ON_
A)) Whenal
lthenonzer
oel
ement
sli
eonl
yont
he
l
eadi
ngdi
agonal
(
(OPTI
ON_
B)) Whenall
thenonzer
oel
ement
sli
eabov
eleadi
ng
di
agonal
(
(OPTI
ON_
C)) Whenall
thenonzer
oel
ement
sli
ebel
owl
eadi
ng
di
agonal
(
(OPTI
ON_
D)) Noneoft
heabov
e
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

I
nal i
nkedr
epresentat
ionofasparsemat
ri
xthe
headnodeforacolumnlist
sstor
es
(
(OPTI
ON_
A)) Apoi
ntert
othenextcol
umnheadnode
(
(OPTI
ON_
B)) Apoi
ntert
othef
ir
stnodei
nthecol
umnl
i
st
(
(OPTI
ON_
C)) Col
umnnumber
(
(OPTI
ON_
D)) Al
loft
heabov
e
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Progr
amminglanguagesl
i
kePASCALand
FORTRANall
ocatememoryspacef
orar
rays_
___
(
(OPTI
ON_
A)) Dy
nami
cal
l
y
(
(OPTI
ON_
B)) St
ati
cal
l
y
(
(OPTI
ON_
C)) Successi
vel
y
(
(OPTI
ON_
D)) al
ter
nat
ivel
y
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

___
__r efer
stotheoper
ati
onofrear
rangi
ngt
he
el
ement sofanar
rayAsothatt
heyarein
i
ncreasingorder
(
(OPTI
ON_
A)) Searching

(
(OPTI
ON_
B)) Sor
ti
ng

(
(OPTI
ON_
C)) Tr
aver
sing

(
(OPTI
ON_
D)) I
nser
ti
ng

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

__
_isali
stinwhichtheor
deroft
heitemsis
si
gni
fi
cantandtheit
emsarenotnecessar
il
ysor
ted
(
(OPTI
ON_
A)) Or
der
edl
i
st
(
(OPTI
ON_
B)) I
ndexedl
i
st
(
(OPTI
ON_
C)) Sequent
ial
li
st
(
(OPTI
ON_
D)) Unor
der
edl
i
st
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Fini
tesequenceSofzer
oormor
echar
act
ersar
e
call
ed
(
(OPTI
ON_
A)) Ar
ray
(
(OPTI
ON_
B)) St
ri
ng
(
(OPTI
ON_
C)) Li
st
(
(OPTI
ON_
D)) Bl
ock
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

St
ri
ngwi
thzer
ochar
act
ersi
scal
l
ed_
___st
ri
ng
(
(OPTI
ON_
A)) Nul
l
(
(OPTI
ON_
B)) Bi
nar
y
(
(OPTI
ON_
C)) Tot
all
ed
(
(OPTI
ON_
D)) Li
st
(
(CORRECT_
C
HOI
CE)) A
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Thenumberofchar
act
ersi
nst
ri
ngi
scal
l
edi
ts
(
(OPTI
ON_
A)) Lengt
h

(
(OPTI
ON_
B)) Br
eadt
h

(
(OPTI
ON_
C)) Wi
dth

(
(OPTI
ON_
D)) Noneoft
heabov
e

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

_
___operat
ionofwor
dprocessingi
nvolves
r
epl
acingonestri
ngi
nthetextbyanother
(
(OPTI
ON_
A)) I
nser
ti
on
(
(OPTI
ON_
B)) Del
eti
on
(
(OPTI
ON_
C)) Sear
chi
ng
(
(OPTI
ON_
D)) Repl
acement
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

__
__ist
hepr
obl
em ofdeci
dingwhetherornota
gi
venst
ri
ngpat
ter
nPappear si
natextT
(
(OPTI
ON_
A)) Pat
ter
nMat
chi
ng
(
(OPTI
ON_
B)) Sear
chi
ng
(
(OPTI
ON_
C)) Sor
ti
ng
(
(OPTI
ON_
D)) Del
eti
on
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

I
fst
ri
ng1=Johnandst
ri
ng2=Ri
ver
sar
emer
ged
t
heprocessi
scal
l
ed

(
(OPTI
ON_
A)) I
nser
ti
on
(
(OPTI
ON_
B)) Del
eti
on
(
(OPTI
ON_
C)) Concat
enat
ion
(
(OPTI
ON_
D)) Repl
acement
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatthef
oll
owingf
unct
ioncal
lmean?
St
rcpy
(s1,s2);
(
(OPTI
ON_
A)) copi
ess1st
ri
ngi
ntos2
(
(OPTI
ON_
B)) copi
ess2st
ri
ngi
ntos1

(
(OPTI
ON_
C)) copi
esbot
hs1ands2
(
(OPTI
ON_
D)) Noneoft
hese
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi l
lbetheoutput?
Voidmain(){
Chara[]=“I
NFO”;
a++;
pr
intf(
“\n%s” ,
a);}
(
(OPTI
ON_
A)) Er
ror
(
(OPTI
ON_
B)) I
NFO
(
(OPTI
ON_
C)) NFO
(
(OPTI
ON_
D)) Noneoft
hese
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Ar
raysubscr
ipt
sinCal
way
sst
artat
(
(OPTI
ON_
A)) -
1
(
(OPTI
ON_
B)) 1
(
(OPTI
ON_
C)) 0
(
(OPTI
ON_
D)) Val
uepr
ovi
dedbyuser

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Maximum numberofelement
sint
hear
ray
decl
arat
ioni
nta[
5][
8]is
(
(OPTI
ON_
A)) 28
(
(OPTI
ON_
B)) 32
(
(OPTI
ON_
C)) 35
(
(OPTI
ON_
D)) 40
(
(CORRECT_
C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Amul t
idi
mensional
arr
aycanbeexpressedi
n
ter
msof
(
(OPTI
ON_
A)) arr
ayofpoint
ersrat
herthanaspoi
nter
stoagroup
of
conti
guousarr
ay
(
(OPTI
ON_
B)) ar
raywi
thoutt
hegr
oupofcont
iguousar
ray
(
(OPTI
ON_
C)) dat
aty
pear
ray
s
(
(OPTI
ON_
D)) Noneoft
hese
(
(CORRECT_
C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Thesi
zeofaSt
ri
ngv
ari
abl
eis
(
(OPTI
ON_
A)) 1by
te
(
(OPTI
ON_
B)) 8by
tes
(
(OPTI
ON_
C)) 16by
tes
(
(OPTI
ON_
D)) None

(
(CORRECT_
C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whichofthefol
l
owingisusedasast
ri
ng
t
erminat
ioncharact
er?
(
(OPTI
ON_
A)) 0
(
(OPTI
ON_
B)) \
0
(
(OPTI
ON_
C)) /
0
(
(OPTI
ON_
D)) Noneoft
hese
(
(CORRECT_
C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
)

Whatwi llbetheout
putofthefoll
owingprogram
code?
voi
dmai n(){
chara[]
=“ Hell
oWorld”;
char*p;
p=a;
pri
ntf(
“\n%d%d%d%d” ,
si
zeof(
a),si
zeof(p)
,str
en(a)
,
str
len(
p)) ;}
(
(OPTI
ON_
A)) 11111010
(
(OPTI
ON_
B)) 10101010
(
(OPTI
ON_
C)) 12121111
(
(OPTI
ON_
D)) 1221111

(
(CORRECT_
C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
ON))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) naci
rcul
arl
i
nkedl
i
st

(
(OPTI
ON_
A)) Component
sar
eal
ll
inkedt
oget
heri
nsomesequent
ial
manner
.
(
(OPTI
ON_
B)) Ther
eisnobegi
nni
ngandnoend.
(
(OPTI
ON_
C)) Component
sar
ear
rangedhi
erar
chi
cal
l
y.
(
(OPTI
ON_
D)) For
war
dandbackwar
dtr
aver
sal
wit
hint
hel
i
sti
s
per
mit
ted.
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Al
ON) i
nearcol
l
ect
ionofdat
ael
ement
swher
ethel
i
nearnode
nbymeansofpoi
nteri
scal
l
ed?
(
(OPTI
ON_
A)) Li
nkedl
i
st

(
(OPTI
ON_
B)) Nodel
i
st
(
(OPTI
ON_
C)) Pr
imi
ti
vel
i
st

(
(OPTI
ON_
D)) None
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whichofthefol
lowi
ngoper
ati
onsisper
for
medmore
ef
fi
cient
lybydoubl
yli
nkedl
i
stthanbysi
ngl
yli
nkedl
i
st

(
(OPTI
ON_
A)) Del
eti
nganodewhosel
ocat
ioni
ngi
ven
(
(OPTI
ON_
B)) Sear
chi
ngofanunsor
tedl
i
stf
oragi
veni
tem
(
(OPTI
ON_
C)) I
nver
ti
nganodeaf
tert
henodewi
thgi
venl
ocat
ion
(
(OPTI
ON_
D)) Tr
aver
singal
i
stt
opr
ocesseachnode
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Co
ON) nsi
derani
mpl
ement
ati
onofunsor
tedsi
ngl
yli
nkedl
i
st.
Supposeithasi t
srepr esentat
ionwithaheadandtai
l
poi
nter.Giv
enther epresentation,whichoft
hefol
l
owing
operat
ioncanbei mpl ement edinO(1)time?
i
)Inserti
onatthef r
ontoft helinkedlist
i
i)I
nserti
onattheendoft heli
nkedlist
i
ii
)Deleti
onoft hefrontnodeoft heli
nkedli
st
i
v)Deleti
onoft helastnodeoft heli
nkedli
st

(
(OPTI
ON_
A)) IandI
I

(
(OPTI
ON_
B)) IandI
II
(
(OPTI
ON_
C)) I
,
IIandI
II
(
(OPTI
ON_
D)) I
,
IIandI
V
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Consi
derani
mpl
ement
ati
onofunsor
tedsi
ngl
yli
nkedl
i
st.
Supposeithasi
tsrepresentat
ionwithaheadpoint
er
onl
y.Giventher
epresentati
on,whichofthef
oll
owing
operat
ioncanbeimplement edinO(1)t
ime?
i
)Inser
ti
onatt
hef
rontoft
hel
i
nkedl
i
st
i
i
)Inser
ti
onatt
heendoft
hel
i
nkedl
i
st
i
i
i)Del
eti
onoft
hef
rontnodeoft
hel
i
nkedl
i
st
i
v)Del
eti
onoft
hel
astnodeoft
hel
i
nkedl
i
st

(
(OPTI
ON_
A)) IandI
I

(
(OPTI
ON_
B)) IandI
II
(
(OPTI
ON_
C)) I
,
IIandI
II
(
(OPTI
ON_
D)) I
,
IIandI
V
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Consi
derani
mpl
ement
ati
onofunsor
teddoubl
yli
nked
l
ist
.Supposeithasit
srepr
esentat
ionwithaheadpoint
er
andtai
lpoi
nter.Gi
venther
epresentat
ion,whi
chofthe
fol
l
owingoperati
oncanbeimplementedinO(1)ti
me?
i
)I
nser
ti
onatt
hef
rontoft
hel
i
nkedl
i
st
i
i
)Insert
ionatt
heendofthel
inkedl
ist
i
i
i)Delet
ionoft
hefr
ontnodeoftheli
nkedli
st
i
v)Delet
ionoft
heendnodeoftheli
nkedli
st

(
(OPTI
ON_
A)) IandI
I
(
(OPTI
ON_
B)) IandI
II
(
(OPTI
ON_
C)) I
,
IIandI
II
(
(OPTI
ON_
D)) I
,
II,
I
IIandI
V
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Consi
derani
mpl
ement
ati
onofunsor
teddoubl
yli
nked
l
ist
.Supposeithasi t
srepresentat
ionwithaheadpoi
nter
onl
y.Giventherepresent
ation,whi
choft hef
oll
owi
ng
operat
ioncanbei mplement edi
nO( 1)t
ime?
i
)I
nser
ti
onatt
hef
rontoft
hel
i
nkedl
i
st
i
i
)Insert
ionatt
heendofthel
inkedl
ist
i
i
i)Delet
ionoft
hefr
ontnodeoftheli
nkedli
st
i
v)Delet
ionoft
heendnodeoftheli
nkedli
st
(
(OPTI
ON_
A)) IandI
I
(
(OPTI
ON_
B)) IandI
II
(
(OPTI
ON_
C)) I
,
IIandI
II
(
(OPTI
ON_
D)) I
,
II,
I
IIandI
V
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Consi
derani
mpl
ement
ati
onofunsor
tedci
rcul
arl
i
nked
l
ist
.Supposeithasi t
srepresentat
ionwithaheadpoi
nter
onl
y.Giventherepresent
ation,whi
choft hef
oll
owi
ng
operat
ioncanbei mplement edi
nO( 1)t
ime?
i
)I
nser
ti
onatt
hef
rontoft
hel
i
nkedl
i
st
i
i
)Insert
ionatt
heendofthel
inkedl
ist
i
i
i)Delet
ionoft
hefr
ontnodeoftheli
nkedli
st
i
v)Delet
ionoft
heendnodeoftheli
nkedli
st

(
(OPTI
ON_
A)) IandI
I
(
(OPTI
ON_
B)) IandI
II
(
(OPTI
ON_
C)) I
,I
I,
II
IandI
V
(
(OPTI
ON_
D)) None
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
)
Consi derani mpl ement ati
onofunsor tedci r
culardoubl
y
l
inkedl ist.Supposei thasitsrepresent at
ionwi thahead
pointeronl y.Givent herepresentation, whichoft he
followingoper ationcanbei mplement edinO( 1)time?
i
)I nsertionatthef rontoft heli
nkedl ist
i
i)inser t
ionatt heendoft heli
nkedl i
st
i
ii)Deletionoft hefrontnodeoft hel i
nkedl i
st
i
v )Deletionoft heendnodeoft hel i
nkedl ist
(
(OPTI
ON_
A)) IandI
I.

(
(OPTI
ON_
B)) IandI
II
(
(OPTI
ON_
C)) I
,I
IandI
II
(
(OPTI
ON_
D)) I
,
II,
I
IIandI
V
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) I
nli
nkedl
i
steachnodecont
ainmi
nimum oft
wof
iel
ds.
Onef
iel
disdat
afi
eldt
ost
oret
hedat
asecondf
iel
dis?

(
(OPTI
ON_
A)) Poi
ntert
ochar
act
er
(
(OPTI
ON_
B)) Poi
ntert
oint
eger
(
(OPTI
ON_
C)) Poi
ntert
onode
(
(OPTI
ON_
D)) Node

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whatwoul
dbet
heasy
mpt
oti
cti
mecompl
exi
tyt
oadda
nodeatt
heendofsingl
yli
nkedli
st,
ift
hepoi
nteri
s
i
nit
ial
l
ypoint
ingt
otheheadoftheli
st?

(
(OPTI
ON_
A)) O(
1)
(
(OPTI
ON_
B)) O(
n)
(
(OPTI
ON_
C)) θ(
n)
(
(OPTI
ON_
D)) θ(
1)
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whatwoul
dbetheasy
mpt ot
ict
imecompl
exi
tyt
oaddan
el
ementi
nthel
i
nkedli
st?

(
(OPTI
ON_
A)) O(
1)
(
(OPTI
ON_
B)) O(
n)

(
(OPTI
ON_
C)) n2)
O(
(
(OPTI
ON_
D)) None
(
(CORRECT_
CH B
OI
CE))
(
A/B/
C/D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

1
(
(MARKS))
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whatwoul
dbet
heasy
mpt
oti
cti
mecompl
exi
tyt
ofi
ndan
el
ementi
nthel
i
nkedl
i
st?

(
(OPTI
ON_
A)) O(
1)

(
(OPTI
ON_
B)) O(
n)

(
(OPTI
ON_
C) n2)
) O(

(
(OPTI
ON_
D)) None
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whatwoul
dbet
heasy
mpt
oti
cti
mecompl
exi
tyt
oinser
t
anel
ementatt
hesecondposi
ti
oni
nthel
i
nkedl
i
st?

(
(OPTI
ON_
A)) O(
1)

(
(OPTI
ON_
B)) O(
n)
(
(OPTI
ON_
C) n2)
) O(
(
(OPTI
ON_
D)) None
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Theconcat
enat
ionoft
wol
i
stcanper
for
medi
nO(
1)t
ime.
Whichoft
hef
oll
owi
ngv
ari
ati
onofl
i
nkedl
i
stcanbe
used?

(
(OPTI
ON_
A)) Si
ngl
yli
nkedl
i
st

(
(OPTI
ON_
B)) Doubl
yli
nkedl
i
st

(
(OPTI
ON_
C)) Ci
rcul
ardoubl
yli
nkedl
i
st

(
(OPTI
ON_
D)) Ar
rayi
mpl
ement
ati
onofl
i
st
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) Consi
dert
hef
oll
owi
ngdef
ini
ti
oni
ncpr
ogr
ammi
ng
l
anguage
str
uctnode
{
i
ntdata;
str
uctnode*next;
}
ty
pedefstr
uctnodeNODE;
NODE* ptr
;

Whichoft
hef
oll
owi
ngccodei
susedt
ocr
eat
enew
node?

(
(OPTI
ON_
A)) pt
r=(
NODE*
)mal
l
oc(
sizeof
(NODE)
);
(
(OPTI
ON_
B)) pt
r=(
NODE*
)mal
l
oc(
NODE)
;

(
(OPTI
ON_
C)) pt
r=(
NODE*
)mal
l
oc(
sizeof
(NODE*
));

(
(OPTI
ON_
D)) pt
r=(
NODE)
mal
l
oc(
sizeof
(NODE)
);

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Av
ari
antofl
i
nkedl
i
sti
nwhi
chl
astnodeoft
hel
i
stpoi
nts
t
othef
ir
stnodeoft
hel
i
sti
s?

(
(OPTI
ON_
A)) Si
ngl
yli
nkedl
i
st

(
(OPTI
ON_
B)) Doubl
yli
nkedl
i
st

(
(OPTI
ON_
C)) Ci
rcul
arl
i
nkedl
i
st

(
(OPTI
ON_
D)) Mul
ti
plyl
i
nkedl
i
st
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) I
ON) ndoubl
yli
nkedl
i
sts,
trav
ersal
canbeper
for
med?
(
(OPTI
ON_
A)) Onl
yinf
orwar
ddi
rect
ion
(
(OPTI
ON_
B)) Onl
yinr
ever
sedi
rect
ion
(
(OPTI
ON_
C)) I
nbot
hdi
rect
ions
(
(OPTI
ON_
D)) None
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whatki
ndofl
i
nkedl
i
sti
sbestt
oanswerquest
ionl
i
ke

Whati
sthei
tem atposi
ti
onn?

(
(OPTI
ON_
A)) Si
ngl
yli
nkedl
i
st

(
(OPTI
ON_
B)) Doubl
yli
nkedl
i
st

(
(OPTI
ON_
C)) Ci
rcul
arl
i
nkedl
i
st

(
(OPTI
ON_
D)) Ar
rayi
mpl
ement
ati
onofl
i
nkedl
i
st
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Av
ari
ati
onofl
i
nkedl
i
sti
sci
rcul
arl
i
nkedl
i
st,
inwhi
cht
he
l
astnodeint heli
stpointstofir
stnodeoft hel
ist
.One
probl
em withthistypeofli
stis?
Itwastememor yspacesincethepointerheadalr
eady
point
stothef i
rstnodeandt hustheli
stnodedoesnot
needtopointtothef i
rstnode.

(
(OPTI
ON_
A)) I
tisnotpossi
blet
oaddanodeatt
heendoft
hel
i
st.

(
(OPTI
ON_
B)) I
tisdi
ff
icul
ttot
rav
erset
hel
i
stast
hepoi
nteroft
hel
ast
nodei
snownotNULL
(
(OPTI
ON_
C)) Al
lofabov
e
(
(OPTI
ON_
D)) None

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Av
ari
antoft
hel
i
nkedl
i
sti
nwhi
chnoneoft
henode
cont
ainsNULLpoi
nteri
s?

(
(OPTI
ON_
A)) Si
ngl
yli
nkedl
i
st

(
(OPTI
ON_
B)) Doubl
yli
nkedl
i
st
(
(OPTI
ON_
C)) Ci
rcul
arl
i
nkedl
i
st
(
(OPTI
ON_
D)) None
(
(CORRECT_
C C
HOI
CE))
(
A/B/
C/D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) nci
rcul
arl
i
nkedl
i
st,
inser
ti
onofnoder
equi
res
i
cat
ionof
?
(
(OPTI
ON_
A)) Onepoi
nter

(
(OPTI
ON_
B)) Twopoi
nter

(
(OPTI
ON_
C)) Thr
eepoi
nter

(
(OPTI
ON_
D)) None
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whi
choft
hef
oll
owi
ngst
atement
saboutl
i
nkedl
i
stdat
a
struct
ureis/
areTRUE?
Addi t
ionanddeleti
onofani
tem to/f
rom t
hel
i
nkedl
i
st
requir
emodi f
icat
ionoft
heexist
ingpoi
nter
s

(
(OPTI
ON_
A)) Thel
i
nkedl
i
stpoi
nter
sdonotpr
ovi
deanef
fi
ci
entwayt
o
sear
chani
tem i
nthel
i
nkedl
i
st
(
(OPTI
ON_
B)) Li
nkedl
i
stpoi
nter
sal
way
smai
ntai
nthel
i
sti
nascendi
ng
or
der

(
(OPTI
ON_
C)) Thel
i
nkedl
i
stdat
ast
ruct
urepr
ovi
desanef
fi
ci
entwayt
o
f
indkt
hel
ementi
nthel
i
st

(
(OPTI
ON_
D)) None

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Li
nkedl
i
stsar
enotsui
tabl
etof
ort
hei
mpl
ement
ati
onof
?

(
(OPTI
ON_
A)) I
nser
ti
onsor
t

(
(OPTI
ON_
B)) Radi
xsor
t

(
(OPTI
ON_
C)) Pol
ynomi
almani
pul
ati
on

(
(OPTI
ON_
D)) Bi
nar
ysear
ch

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) I
nwor
stcase,
thenumberofcompar
isonneedt
osear
ch
asi
ngl
yli
nkedl
i
stofl
engt
hnf
oragi
venel
ementi
s

(
(OPTI
ON_
A)) l
ogn

(
(OPTI
ON_
B)) n/
2

(
(OPTI
ON_
C)) l
og2n-
1
(
(OPTI
ON_
D)) n

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) consi
dert
hef
unct
ionfdef
inedher
e:
structit
em
{
i
ntdat a;
structit
em *next
;
};
i
ntf( str
uctit
em *p)
{
return(
(p==NULL)||
((
p->next
==NULL)
||
(p-
>dat
a<=p-
>next
->dat&&( p-
>next
)))
;
}
Foragi
venl
i
nkedl
i
stp,
thef
unct
ionfr
etur
ns1i
fand
onl
yif

(
(OPTI
ON_
A)) t
hel
i
sti
sempt
yorhasexact
lyoneel
ement

(
(OPTI
ON_
B)) t
heel
ementi
nthel
i
star
esor
tedi
nnon-
decr
easi
ngor
der
ofdat
aval
ue

(
(OPTI
ON_
C)) t
heel
ementi
nthel
i
star
esor
tedi
nnon-
incr
easi
ngor
der
ofdat
aval
ue

(
(OPTI
ON_
D)) notal
lel
ementi
nthel
i
sthav
ethesamedat
aval
ue

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) Thef
oll
owi
ngCf
unct
iont
akesasi
ngl
yli
nkedl
i
stasi
nput
argument .Itmodifi
esthel
istbymovi
ngt
helastel
ement
tot hefrontoftheli
standr
eturnst
hemodi
fi
edlist
.Some
partoft hecodeleftbl
ank.
typedefstructnode
{
i
ntv al
ue;
structnode*next ;
}Node;
Node*mov e_t
o_f
ront(
Node*hea
{
Node*p, *q;
i
f((
head==NULL)| |(
head-
>next
==NULL)
)
ret
urnhead;
q=NULL;
p=head;
whil
e(p->next!
=NULL)
{
q=p;
p=p->next;
}
ret
urnhead;
}

Chooset
hecor
rectal
ter
nat
ivet
orepl
acet
hebl
ankl
i
ne

(
(OPTI
ON_
A)) q=NULL;
p->next
=head;
head=p;

(
(OPTI
ON_
B)) q-
>next
=NULL;
head=p;
p->next=head;

(
(OPTI
ON_
C)) head=p;
p->next
=q;
q->next
=NULL;

(
(OPTI
ON_
D)) q-
>next
=NULL;
p->next
=head;
head=p;
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
)
Thefoll
owingCFunctiont akesasi ngl
y-li
nkedl
istof
i
ntegersasaparameterandr earr
anges
theelementsofthel
i
st s.Thef uncti
oniscall
edwiththe
l
istcontai
ningt
heint
eger s1,2,3,
4,5,6,
7inthegi
venorder.
Whatwil
lbet
hecontent
soft
hel
i
staf
tert
hef
unct
ion
compl
etesex
ecut
ion?
structnode{ i
ntv al
ue;
structnode*next ;
};
voidr earr
ange( structnode*l
i
st)
structnode* p,q;
i
ntt emp;
(!List||!l
ist
->next)return;
t;q=li
st->next;
whi l
e(q)
{
t
emp=p-
>val
ue;
p->v
alue=q-
>val
ue;
q-
>val
ue=t
emp;
p=q-
>next
;
q=p?
p->next
:0;
}
}

(
(OPTI
ON_
A)) 1,2,
3,4,
5,6,
7

(
(OPTI
ON_
B)) 2,1,
4,3,
6,5,
7

(
(OPTI
ON_
C)) 1,3,
2,5,
4,7,
6

(
(OPTI
ON_
D)) 2,3,
4,5,
6,7,
1

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) ndoubl
yli
nkedl
i
stt
rav
ersi
ngconet
ohal
tat
(
(OPTI
ON_
A)) Nul
l

(
(OPTI
ON_
B)) Fr
ont

(
(OPTI
ON_
C)) Rear

(
(OPTI
ON_
D)) r
ear
-1;

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) L
ON) i
nkedl
i
stsar
ebestsui
ted.
..
..

(
(OPTI
ON_
A)) f
orr
elat
ivel
yper
manentcol
l
ect
ionsofdat

(
(OPTI
ON_
B)) f
ort
hesi
zeoft
hest
ruct
ureandt
hedat
aint
hest
ruct
ure
ar
econst
ant
lychangi
ng.

(
(OPTI
ON_
C)) dat
ast
ruct
ure

(
(OPTI
ON_
D)) f
ornoneofabov
esi
tuat
ion

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) eoper
ati
onofpr
ocessi
ngeachel
ementi
nthel
i
sti
s
knownas.
..
..
.
(
(OPTI
ON_
A)) sort
ing

(
(OPTI
ON_
B)) mer
ging

(
(OPTI
ON_
C)) i
nser
ti
ng

(
(OPTI
ON_
D)) t
rav
ersal

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) esi
tuat
ionwheni
nal
i
nkedl
i
stSTART=NULLi
s..
..

(
(OPTI
ON_
A)) Under
fl
ow

(
(OPTI
ON_
B)) Ov
erf
low

(
(OPTI
ON_
C)) Housef
ul

(
(OPTI
ON_
D)) Sat
urat
ed

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) E
ON) achnodei
nsi
ngl
yli
nkedl
i
sthas.
..
..
..
.f
iel
ds.

(
(OPTI
ON_
A)) 2

(
(OPTI
ON_
B)) 3

(
(OPTI
ON_
C)) 1

(
(OPTI
ON_
D)) 4

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)
) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
choft
hef
oll
owi
ngi
stwowayl
i
sts?

(
(OPTI
ON_
A)) Gr
oundedheaderl
i
st

(
(OPTI
ON_
B)) Ci
rcul
arheaderl
i
st

(
(OPTI
ON_
C)) Li
nkedl
i
stwi
thheaderandt
rai
l
ernodes

(
(OPTI
ON_
D)) Li
stt
rav
ersedi
ntwodi
rect
ions
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

1
(
(MARKS))
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
chi
sthepoi
nterassoci
atedwi
tht
heav
ail
abi
l
ityl
i
st?

(
(OPTI
ON_
A)) FI
RST

(
(OPTI
ON_
B)) AVAI
L

(
(OPTI
ON_
C)) TOP

(
(OPTI
ON_
D)) REAR

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Va
ON) l
ueoff
ir
stl
i
nkedl
i
sti
ndexi
s..
..

(
(OPTI
ON_
A)) 0

(
(OPTI
ON_
B)) 1

(
(OPTI
ON_
C)) -
1

(
(OPTI
ON_
D)) 2

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) nli
nkedl
i
stst
her
ear
enoNULLl
i
nksi
n

(
(OPTI
ON_
A)) si
ngl
eli
nkedl
i
st

(
(OPTI
ON_
B)) l
i
neardoubl
yli
nkedl
i
st

(
(OPTI
ON_
C)) ci
rcul
arl
i
nkedl
i
st

(
(OPTI
ON_
D)) l
i
nkedl
i
st

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) E
ON) achnodei
nal
i
nkedl
i
stmustcont
ainatl
east.
..
..

(
(OPTI
ON_
A)) Thr
eef
iel
ds

(
(OPTI
ON_
B)) Twof
iel
ds

(
(OPTI
ON_
C)) Fourf
iel
ds

(
(OPTI
ON_
D)) Fi
vef
iel
ds

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) edummyheaderi
nli
nkedl
i
stcont
ain.
..
..

(
(OPTI
ON_
A)) f
ir
str
ecor
doft
heact
ual
dat
a

(
(OPTI
ON_
B)) l
astr
ecor
doft
heact
ual
dat
a

(
(OPTI
ON_
C)) poi
ntert
othel
astr
ecor
doft
heact
ual
dat
a

(
(OPTI
ON_
D)) mi
ddl
erecor
doft
heact
ual
dat
a

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) nal
i
nkedl
i
stt
he.
..
..
..
..
.fi
eldcont
ainst
headdr
essofnext
el
ementi
nthel
i
st.

(
(OPTI
ON_
A)) Li
nkf
iel
d

(
(OPTI
ON_
B)) Nextel
ementf
iel
d

(
(OPTI
ON_
C)) St
artf
iel
d

(
(OPTI
ON_
D)) I
nfof
iel
d

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) L
ON) LI
NKi
sthepoi
nterpoi
nti
ngt
othe.
..

(
(OPTI
ON_
A)) successornode

(
(OPTI
ON_
B)) pr
edecessornode

(
(OPTI
ON_
C)) headnode

(
(OPTI
ON_
D)) l
astnode
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) .
ON) ..
..
..
..
.ref
erst
oal
i
nearcol
l
ect
ionofdat
ait
ems.

(
(OPTI
ON_
A)) Li
st

(
(OPTI
ON_
B)) Tr
ee

(
(OPTI
ON_
C)) Gr
aph

(
(OPTI
ON_
D)) Edge

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ar
ON) unl
i
sti
s..
..
..

(
(OPTI
ON_
A)) smal
lbat
chesofr
ecor
dsf
rom af
il
e

(
(OPTI
ON_
B)) numberofel
ement
shav
ingsamev
alue

(
(OPTI
ON_
C)) numberofr
ecor
ds

(
(OPTI
ON_
D)) numberoff
il
esi
next
ernal
stor
age

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) A.
ON) ..
..
.indi
cat
est
heendoft
hel
i
st.

(
(OPTI
ON_
A)) Guar
d

(
(OPTI
ON_
B)) Sent
inel

(
(OPTI
ON_
C)) Endpoi
nter

(
(OPTI
ON_
D)) Lastpoi
nter

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) A.
ON) ..
..
..
.i
sal
i
nearl
i
sti
nwhi
chi
nser
ti
onsanddel
eti
onsar
e
madet
ofr
om ei
therendoft
hest
ruct
ure.

(
(OPTI
ON_
A)) ci
rcul
arqueue

(
(OPTI
ON_
B)) r
andom ofqueue

(
(OPTI
ON_
C)) pr
ior
it
y

(
(OPTI
ON_
D)) dequeue
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) ndex
ingt
he.
..
..
..
.el
ementi
nthel
i
sti
snotpossi
blei
n
l
i
nkedl
i
sts.

(
(OPTI
ON_
A)) mi
ddl
e

(
(OPTI
ON_
B)) f
ir
st

(
(OPTI
ON_
C)) l
ast

(
(OPTI
ON_
D)) anywher
einbet
ween

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Al
ON) i
nearl
i
sti
nwhi
cht
hepoi
nterpoi
ntsonl
ytot
he
successi
venodei
s..
..
..

(
(OPTI
ON_
A)) si
ngl
yli
nkedl
i
st
(
(OPTI
ON_
B)) ci
rcul
arl
i
nkedl
i
st

(
(OPTI
ON_
C)) doubl
yli
nkedl
i
st

(
(OPTI
ON_
D)) noneoft
heabov
e

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) .
ON) ..
..
..
.mayt
akepl
aceonl
ywhent
her
eissomemi
nimum
amount
(or
)nospacel
efti
nfr
eest
oragel
i
st.

(
(OPTI
ON_
A)) Memor
ymanagement

(
(OPTI
ON_
B)) Gar
bagecol
l
ect
ion

(
(OPTI
ON_
C)) Recy
clebi
n

(
(OPTI
ON_
D)) None

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) Al
ON) i
nearl
i
sti
nwhi
cht
hel
astnodepoi
ntst
othef
ir
stnode
i
s..
..
.

(
(OPTI
ON_
A)) si
ngl
yli
nkedl
i
st

(
(OPTI
ON_
B)) ci
rcul
arl
i
nkedl
i
st

(
(OPTI
ON_
C)) doubl
yli
nkedl
i
st

(
(OPTI
ON_
D)) noneoft
heabov
e

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Al
ON) i
nkedl
i
sti
swhi
cht
ypeofdat
ast
ruct
ure.

(
(OPTI
ON_
A)) Li
near

(
(OPTI
ON_
B)) NonLi
near
.

(
(OPTI
ON_
C)) Hi
erar
chi
cal

(
(OPTI
ON_
D)) .
None

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ty
ON) peofst
oragei
susedt
orepr
esentLi
sts

(
(OPTI
ON_
A)) Random

(
(OPTI
ON_
B)) Sequent
ial

(
(OPTI
ON_
C)) Dy
nami
c

(
(OPTI
ON_
D)) Logi
cal

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) L
ON) i
nkedl
i
star
ebestsui
ted

(
(OPTI
ON_
A)) Forr
elat
ivel
yper
manentcol
l
ect
ionsofdat
a

(
(OPTI
ON_
B)) Fort
hesi
zeofst
ruct
urei
sconst
ant
lychanged

(
(OPTI
ON_
C)) Bot
ha&b

(
(OPTI
ON_
D)) None

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) L
ON) i
nearor
derl
i
nkedl
i
sti
spr
ovi
dedt
hrough_
___
___
__

(
(OPTI
ON_
A)) v
ari
abl
es

(
(OPTI
ON_
B)) ar
ray
s

(
(OPTI
ON_
C)) Poi
nter

(
(OPTI
ON_
D)) St
ri
ngs
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) naSi
ngl
eLi
nkLi
st_
___
___
__nodecont
ainsnol
i
nks.

(
(OPTI
ON_
A)) Fi
rst

(
(OPTI
ON_
B)) Last

(
(OPTI
ON_
C)) l
astbutone

(
(OPTI
ON_
D)) mi
ddl
e
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) nSi
ngl
eLi
nkedLi
stanodecont
ainmi
nimum howmany
f
iel
ds(
assumi
ngonef
ordat
a).

(
(OPTI
ON_
A)) 2

(
(OPTI
ON_
B)) 3

(
(OPTI
ON_
C)) 1

(
(OPTI
ON_
D)) None

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Si
ON) ngl
eli
nkl
i
stper
for
mswhi
choft
hef
oll
owi
ngmet
hods
1)I
nser
ti
on
2)Modi
fi
cat
ion
3)Sear
chi
ng

(
(OPTI
ON_
A)) 1and2

(
(OPTI
ON_
B)) 2and3

(
(OPTI
ON_
C)) 1and3

(
(OPTI
ON_
D)) Al
l

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) nli
nkedl
i
stst
her
ear
enoNULLl
i
nksi
n:

(
(OPTI
ON_
A)) Si
ngl
yli
nkedl
i
st

(
(OPTI
ON_
B)) Doubl
yli
nkedl
i
st

(
(OPTI
ON_
C)) Ci
rcul
arl
i
nkedl
i
st

(
(OPTI
ON_
D)) None
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) el
i
stwi
thnonodei
scal
l
edas

(
(OPTI
ON_
A)) Empt
yli
st

(
(OPTI
ON_
B)) Nul
ll
ist

(
(OPTI
ON_
C)) Zer
oli
st

(
(OPTI
ON_
D)) None

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
choft
hef
oll
owi
ngi
stheappl
i
cat
ionoft
hesi
ngl
y
l
i
nkedl
i
st?

(
(OPTI
ON_
A)) Spar
semat
ri
x

(
(OPTI
ON_
B)) Pol
icenot
ati
on

(
(OPTI
ON_
C)) CTowerofHanoi

(
(OPTI
ON_
D)) Al
l

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
choft
hef
oll
owi
ngwi
l
lcont
ainmor
ememor
yspace?

(
(OPTI
ON_
A)) Si
ngl
yli
nkedl
i
st

(
(OPTI
ON_
B)) Doubl
yli
nkedl
i
st

(
(OPTI
ON_
C)) Ar
ray

(
(OPTI
ON_
D)) Ci
rcul
arl
i
nkedl
i
st

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
1
(
(MARKS))
(
1/2/
3..
.)

(
(QUESTI ) I
ON) npol
ynomi
almani
pul
ati
on,
nodesconsi
stsoft
hreef
iel
d
r
epr
esent
ing

(
(OPTI
ON_
A)) Coef
fi
cient
,exponent
ial
andl
i
nk

(
(OPTI
ON_
B)) Pr
evi
ousi
tem l
i
nk,
dat
ait
em,
nexti
tem l
i
nk

(
(OPTI
ON_
C)) Coef
fi
cient
,dat
ait
em andl
i
nk

(
(OPTI
ON_
D)) None
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Al
ON) i
nkedl
i
sti
nwhi
chl
astnodecont
aint
hel
i
nkoft
hef
ir
st
nodei
scal
l
ed

(
(OPTI
ON_
A)) Si
ngl
yli
nkedl
i
st

(
(OPTI
ON_
B)) Doubl
yli
nkedl
i
st

(
(OPTI
ON_
C)) Ci
rcul
arl
i
nkedl
i
st

(
(OPTI
ON_
D)) Al
l
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) As
ON) i
ngl
yli
nkedl
i
stf
aci
l
itat
esl
i
stt
rav
ersal
in

(
(OPTI
ON_
A)) Si
ngl
edi
rect
ion

(
(OPTI
ON_
B)) Anydi
rect
ion

(
(OPTI
ON_
C)) Ci
rcul
ardi
rect
ion

(
(OPTI
ON_
D)) Al
l
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ad
ON) oubl
yli
nkedl
i
stf
aci
l
itat
esl
i
stt
rav
ersal
in

(
(OPTI
ON_
A)) Si
ngl
edi
rect
ion

(
(OPTI
ON_
B)) Anydi
rect
ion

(
(OPTI
ON_
C)) Ci
rcul
ardi
rect
ion

(
(OPTI
ON_
D)) Al
l

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) L
ON) i
nkedl
i
stSTART=NULLi
s__
___
___
___
_

(
(OPTI
ON_
A)) Under
fl
ow
(
(OPTI
ON_
B)) Ov
erf
low

(
(OPTI
ON_
C)) None

(
(OPTI
ON_
D))

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) nal
i
nkedl
i
st,
thepoi
nteroft
hel
astnodecont
ainst
he
speci
alv
aluecal
l
ed_
___
___
___
___
__l
i
nke

(
(OPTI
ON_
A)) Li
nkedt
othef
ir
stnode

(
(OPTI
ON_
B)) Nul
l

(
(OPTI
ON_
C)) Li
nk

(
(OPTI
ON_
D)) Poi
ntert
othet
ail
node

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
choft
hef
oll
owi
ngi
sli
neardat
ast
ruct
ure?

(
(OPTI
ON_
A)) Tr
ee
(
(OPTI
ON_
B)) Gr
aph

(
(OPTI
ON_
C)) Li
nkedLi
st

(
(OPTI
ON_
D)) Al
l
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) nwhi
chl
i
nkedl
i
st,
nodesi
nfor
m ofr
ing?

(
(OPTI
ON_
A)) Si
ngl
yli
nkedl
i
st

(
(OPTI
ON_
B)) Doubl
yli
nkedl
i
st

(
(OPTI
ON_
C)) Ci
rcul
arl
i
nkedl
i
st

(
(OPTI
ON_
D)) Al
l

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ba
ON) l
anci
ngsy
mbol
isaappl
i
cat
ionof_
___
___
___
___
__.

(
(OPTI
ON_
A)) Si
ngl
yli
nkedl
i
st

(
(OPTI
ON_
B)) Doubl
yli
nkedl
i
st

(
(OPTI
ON_
C)) Ci
rcul
arl
i
nkedl
i
st
(
(OPTI
ON_
D)) Li
nkedst
ack

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) atki
ndofl
i
sti
sbestt
oanswerquest
ionssuchas
"
Whati
sthei
tem atposi
ti
onn?
"

(
(OPTI
ON_
A)) Li
stsi
mpl
ement
edwi
thanar
ray

(
(OPTI
ON_
B)) Doubl
yli
nkedl
i
sts

(
(OPTI
ON_
C)) Si
ngl
yli
nkedl
i
sts.

(
(OPTI
ON_
D)) Doubl
yli
nkedorsi
ngl
yli
nkedl
i
stsar
eequal
l
ybe
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) L
ON) i
nkedl
i
stsar
ebestsui
ted.
..
..

(
(OPTI
ON_
A)) f
orr
elat
ivel
yper
manentcol
l
ect
ionsofdat
a

(
(OPTI
ON_
B)) f
ort
hesi
zeoft
hest
ruct
ureandt
hedat
aint
hest
ruct
ure
ar
econst
ant
lychangi
ng.

(
(OPTI
ON_
C)) dat
ast
ruct
ure

(
(OPTI
ON_
D)) f
ornoneofabov
esi
tuat
ion
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) eoper
ati
onofpr
ocessi
ngeachel
ementi
nthel
i
sti
s
knownas.
..
..
.

(
(OPTI
ON_
A)) sor
ti
ng

(
(OPTI
ON_
B)) mer
ging

(
(OPTI
ON_
C)) i
nser
ti
ng

(
(OPTI
ON_
D)) t
rav
ersal

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) E
ON) achnodei
nsi
ngl
yli
nkedl
i
sthas.
..
..
..
.f
iel
ds.

(
(OPTI
ON_
A)) 2

(
(OPTI
ON_
B)) 3

(
(OPTI
ON_
C)) 1

(
(OPTI
ON_
D)) 4

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
choft
hef
oll
owi
ngi
stwowayl
i
sts?

(
(OPTI
ON_
A)) Gr
oundedheaderl
i
st

(
(OPTI
ON_
B)) Ci
rcul
arheaderl
i
st

(
(OPTI
ON_
C)) Li
nkedl
i
stwi
thheaderandt
rai
l
ernodes

(
(OPTI
ON_
D)) Li
stt
rav
ersedi
ntwodi
rect
ions

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
chi
sthepoi
nterassoci
atedwi
tht
heav
ail
abi
l
ityl
i
st?

(
(OPTI
ON_
A)) FI
RST

(
(OPTI
ON_
B)) AVAI
L

(
(OPTI
ON_
C)) TOP

(
(OPTI
ON_
D)) REAR

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Va
ON) l
ueoff
ir
stl
i
nkedl
i
sti
ndexi
s..
..

(
(OPTI
ON_
A)) 0

(
(OPTI
ON_
B)) 1

(
(OPTI
ON_
C)) -
1

(
(OPTI
ON_
D)) 2

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) nli
nkedl
i
stst
her
ear
enoNULLl
i
nksi
n

(
(OPTI
ON_
A)) si
ngl
eli
nkedl
i
st

(
(OPTI
ON_
B)) l
i
neardoubl
yli
nkedl
i
st

(
(OPTI
ON_
C)) ci
rcul
arl
i
nkedl
i
st

(
(OPTI
ON_
D)) l
i
nkedl
i
st
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) edummyheaderi
nli
nkedl
i
stcont
ain.
..
..

(
(OPTI
ON_
A)) f
ir
str
ecor
doft
heact
ual
dat
a

(
(OPTI
ON_
B)) l
astr
ecor
doft
heact
ual
dat
a

(
(OPTI
ON_
C)) poi
ntert
othel
astr
ecor
doft
heact
ual
dat
a

(
(OPTI
ON_
D)) mi
ddl
erecor
doft
heact
ual
dat
a

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) nal
i
nkedl
i
stt
he.
..
..
..
..
.fi
eldcont
ainst
headdr
essofnext
el
ementi
nthel
i
st.

(
(OPTI
ON_
A)) Li
nkf
iel
d

(
(OPTI
ON_
B)) Nextel
ementf
iel
d

(
(OPTI
ON_
C)) St
artf
iel
d

(
(OPTI
ON_
D)) I
nfof
iel
d
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) L
ON) LI
NKi
sthepoi
nterpoi
nti
ngt
othe.
..

(
(OPTI
ON_
A)) successornode

(
(OPTI
ON_
B)) pr
edecessornode

(
(OPTI
ON_
C)) headnode

(
(OPTI
ON_
D)) l
astnode
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) .
ON) ..
..
..
..
.ref
erst
oal
i
nearcol
l
ect
ionofdat
ait
ems.

(
(OPTI
ON_
A)) Li
st

(
(OPTI
ON_
B)) Tr
ee

(
(OPTI
ON_
C)) Gr
aph

(
(OPTI
ON_
D)) Edge

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) el
i
nkedl
i
stwoul
dbeabl
etomakeuseofa-
--
--
--
--
--
--
whosev
aluei
stheaddr
essoft
hel
ocat
ionwhi
chst
ores
t
henode.

(
(OPTI
ON_
A)) f
loat

(
(OPTI
ON_
B)) char

(
(OPTI
ON_
C)) poi
nter

(
(OPTI
ON_
D)) v
oid

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Toi
ON) nser
tanewnodei
nli
nkedl
i
stf
reenodewi
l
lbe
av
ail
abl
ein.
..
..
..
.

(
(OPTI
ON_
A)) Av
ail
abl
eli
st

(
(OPTI
ON_
B)) Av
ail
li
st

(
(OPTI
ON_
C)) Fr
eenodel
i
st

(
(OPTI
ON_
D)) Memor
yspacel
i
st

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) As
ON) i
ngl
yli
nkedl
i
sti
sal
socal
l
edas.
..
..
..
.

(
(OPTI
ON_
A)) l
i
nkedl
i
st

(
(OPTI
ON_
B)) onewaychai
n

(
(OPTI
ON_
C)) t
wowaychai
n

(
(OPTI
ON_
D)) r
ightl
i
nk

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) A.
ON) ..
..
li
sti
saheaderl
i
stwher
ethenodepoi
ntsbackt
othe
headernode.

(
(OPTI
ON_
A)) Ci
rcul
arheader

(
(OPTI
ON_
B)) Gr
oundedheader

(
(OPTI
ON_
C)) Twowayheader

(
(OPTI
ON_
D)) Onewayheader

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ad
ON) oubl
yli
nkedl
i
sthas.
..
..
..
..
.poi
nter
swi
theachnode.

(
(OPTI
ON_
A)) 0

(
(OPTI
ON_
B)) 1

(
(OPTI
ON_
C)) 2

(
(OPTI
ON_
D)) 3

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) He
ON) aderl
i
nkedl
i
stsar
efr
equent
lyusedf
ormai
ntai
ning
.
..
..
..
.i
nmemor
y.

(
(OPTI
ON_
A)) Pol
ynomi
als

(
(OPTI
ON_
B)) Bi
nomi
al

(
(OPTI
ON_
C)) Tr
inomi
al

(
(OPTI
ON_
D)) Quadr
ati
cequat
ion

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) epoi
ntert
hatpoi
ntst
othef
ir
stnodei
nthel
i
sti
s..
..
..
..

(
(OPTI
ON_
A)) FI
RST

(
(OPTI
ON_
B)) AVAI
L

(
(OPTI
ON_
C)) TOP

(
(OPTI
ON_
D)) REAR

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Two
ON) -
wayl
i
stmaybemai
ntai
nedi
nmemor
ybymeansof
.
..
..
..
..
..
..

(
(OPTI
ON_
A)) Queues

(
(OPTI
ON_
B)) Li
nearar
ray
s

(
(OPTI
ON_
C)) Nonl
i
nearar
ray
s

(
(OPTI
ON_
D)) St
acks

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ad
ON) oubl
yli
nkedl
i
sti
sal
socal
l
edas.
..
..
..
..l
i
nkedl
i
st

(
(OPTI
ON_
A)) onewaychai
n

(
(OPTI
ON_
B)) t
wowaychai
n

(
(OPTI
ON_
C)) r
ightl
i
nk

(
(OPTI
ON_
D)) None

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) el
i
stt
hatr
equi
rest
wopoi
nterv
ari
abl
esFI
RSTand
LASTiscall
ed.
..
..
..
.
(
(OPTI
ON_
A)) Cir
cul
arli
st

(
(OPTI
ON_
B)) Headerl
i
st

(
(OPTI
ON_
C)) Onewayl
i
st

(
(OPTI
ON_
D)) Twowayl
i
st

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) ftheav
ail
abi
l
ityl
i
sti
snul
l
,thent
hecondi
ti
oni
ssai
dtobe
..
.
(
(OPTI
ON_
A)) ni
lbl
ock

(
(OPTI
ON_
B)) avai
l
abi
l
ityl
i
stunder
fl
ow

(
(OPTI
ON_
C)) avai
l
abi
l
ityl
i
stov
erf
low

(
(OPTI
ON_
D)) memor
yloss

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) el
i
stwhi
chhasi
tsownpoi
nteri
scal
l
ed.
..
..
..
.

(
(OPTI
ON_
A)) poi
nterl
i
st

(
(OPTI
ON_
B)) sel
fpoi
nter

(
(OPTI
ON_
C)) f
reepool

(
(OPTI
ON_
D)) ownpoi
nter

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
choft
hef
oll
owi
ngi
stwowayl
i
sts?

(
(OPTI
ON_
A)) Gr
oundedheaderl
i
st

(
(OPTI
ON_
B)) Ci
rcul
arheaderl
i
st

(
(OPTI
ON_
C)) Li
nkedl
i
stwi
thheaderandt
rai
l
ernodes

(
(OPTI
ON_
D)) Noneoft
heabov
e

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) A.
ON) ..
..
..
..
.isaheaderl
i
stwher
ethel
astnodecont
ainst
he
nullpoi
nter
.
(
(OPTI
ON_
A)) groundedheaderl
i
st

(
(OPTI
ON_
B)) bot
tom headerl
i
st

(
(OPTI
ON_
C)) downheaderl
i
st

(
(OPTI
ON_
D)) dr
oppedheaderl
i
st

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) RL
ON) I
NKi
sthepoi
nterpoi
nti
ngt
othe.
..

(
(OPTI
ON_
A)) successornode

(
(OPTI
ON_
B)) pr
edecessornode

(
(OPTI
ON_
C)) headnode

(
(OPTI
ON_
D)) l
astnode

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) Th
ON) edi
sadv
ant
agei
nusi
ngaci
rcul
arl
i
nkedl
i
sti
s..
..
..
.

(
(OPTI
ON_
A)) i
tispossi
blet
ogeti
ntoi
nfi
nit
eloop

(
(OPTI
ON_
B)) l
astnodepoi
ntst
ofi
stnode.

(
(OPTI
ON_
C)) t
imeconsumi
ng

(
(OPTI
ON_
D)) r
equi
resmor
ememor
yspace
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
choft
hef
oll
owi
ngcondi
ti
onschecksav
ail
abl
efr
ee
spaceinavai
ll
ist
?
(
(OPTI
ON_
A)) Avail
=Nul
l

(
(OPTI
ON_
B)) Nul
l=Av
ail

(
(OPTI
ON_
C)) Av
ail
=Maxst
ack

(
(OPTI
ON_
D)) Av
ail
=Top
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Al
ON) i
nearl
i
sti
nwhi
cheachnodehaspoi
ntt
othe
pr
edecessorandsuccessor
snodesi
scal
l
ed.
..
..
..
.
(
(OPTI
ON_
A)) si
ngl
ylinkedl
ist

(
(OPTI
ON_
B)) ci
rcul
arl
i
nkedl
i
st

(
(OPTI
ON_
C)) doubl
yli
nkedl
i
st

(
(OPTI
ON_
D)) l
i
nearl
i
nkedl
i
st

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Su
ON) pposecur
sorpoi
ntst
oanodei
nal
i
nkedl
i
st.What
stat
ementchangescur
sorsot
hati
tpoi
ntst
othenext
node?
(
(OPTI
ON_
A))
cur
sor
++;

(
(OPTI
ON_
B))
cur
sor=l
i
nk;

(
(OPTI
ON_
C))
cur
sor+=l
i
nk;

(
(OPTI
ON_
D)) cur
sor=cur
sor
->l
i
nk
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
)
Supposecursorpointstoanodei
nalinkedli
st.What
Booleanexpressi
onwi l
lbet
ruewhencursorpoint
stothe
tai
lnodeofthel i
st?

(
(OPTI
ON_
A))
(
cur
sor==NULL)

(
(OPTI
ON_
B))
(
cur
sor
->l
i
nk==NULL)

(
(OPTI
ON_
C))
(
cur
sor
->dat
a==NULL)

(
(OPTI
ON_
D))
(
cur
sor
->dat
a==0.
0)

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
)
Supposethatpi
sapointervar
iabl
ethatcont
ainsthe
NULLpointer
.Whathappensifyourpr
ogram t
riestor
ead
orwri
te*p?

(
(OPTI
ON_
A))
Asy
ntaxer
roral
way
soccur
satcompi
l
ati
ont
ime.

(
(OPTI
ON_
B))
Ar
un-
ti
meer
roral
way
soccur
swhen*
pisev
aluat
e
(
(OPTI
ON_
C))
Arun-
ti
meer
roral
way
soccur
swhent
hepr
ogr
am
f
ini
shes.

(
(OPTI
ON_
D))
Ther
esul
tsar
eunpr
edi
ctabl
e.

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
)
Supposet
hatfi
saf
unct
ionwi
thapr
otot
ypel
i
ket
his:

voidf(
_ _
______head_ptr
);
//Precondit
ion:head_ptri
saheadpoi nterforali
nked
l
ist
.
//Postconditi
on:Thefuncti
onfhasdonesome
comput ati
onwi t
h
//theli
nkedl i
stbutt
, heli
stit
selfisunchange
Whatisthebestdat atypeforhead_ptri
nthisfuncti
on?

(
(OPTI
ON_
A))
node

(
(OPTI
ON_
B))
constnode

(
(OPTI
ON_
C))
node*

(
(OPTI
ON_
D))
constnode*

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) atki
ndofl
i
sti
sbestt
oanswerquest
ionssuchas
i
sthei
tem atposi
ti
onn?
(
(OPTI
ON_
A))
Li
stsi
mpl
ement
edwi
thanar
ray
.
(
(OPTI
ON_
B))
Doubl
y-
li
nkedl
i
sts.

(
(OPTI
ON_
C))
Si
ngl
y-
li
nkedl
i
sts.

(
(OPTI
ON_
D))
Doubl
y-
li
nkedorsi
ngl
y-
li
nkedl
i
stsar
eequal
l
ybest

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) L
ON) i
nearor
derl
i
nkedl
i
sti
spr
ovi
dedt
hrough_
___
___
__

(
(OPTI
ON_
A))
v
ari
abl
es

(
(OPTI
ON_
B))
ar
ray
s

(
(OPTI
ON_
C))
Poi
nter

(
(OPTI
ON_
D))
st
ri
ngs

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) naSi
ngl
eLi
nkLi
st_
___
___
__nodecont
ainsnol
i
nks.

(
(OPTI
ON_
A))
Fi
rst

(
(OPTI
ON_
B))
Last

(
(OPTI
ON_
C))
l
astbutone

(
(OPTI
ON_
D))
mi
ddl
e

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Al
ON) i
nkedl
i
sti
swhi
cht
ypeofdat
ast
ruct
ure

(
(OPTI
ON_
A))
Li
near

(
(OPTI
ON_
B))
NonLi
near

(
(OPTI
ON_
C))
Hi
erar
chi
cal

(
(OPTI
ON_
D))
None

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) nSi
ngl
eLi
nkedLi
stanodecont
ainmi
nimum howmany
f
iel
ds(
assumi
ngonef
ordat
.
(
(OPTI
ON_
A)) 2

(
(OPTI
ON_
B)) 3

(
(OPTI
ON_
C)) 1

(
(OPTI
ON_
D)) 0

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) mpl
ement
ati
onofpr
ior
it
yqueue
1)Tr
ee
2)Li
nkedli
st
3)Doubl
yli
nkedl
i
st

(
(OPTI
ON_
A)) 1and2

(
(OPTI
ON_
B)) 2and3

(
(OPTI
ON_
C)) 1and3

(
(OPTI
ON_
D)) Al
l

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Nu
ON) l
lpoi
nteri
susedt
otel
l
1)Endoftheli
nkedlist
2)Emptypoint
erfiel
dofastr
uct
ure
3)Thel
inkedli
stisempt y

(
(OPTI
ON_
A)) 1

(
(OPTI
ON_
B)) 2and3

(
(OPTI
ON_
C)) 1and3

(
(OPTI
ON_
D)) Al
l

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
)
Si
ngleli
nklistper
for
mswhi
choft
hef
oll
owi
ngmet
hods
1)I
nserti
on
2)Modificat
ion
3)Searching

(
(OPTI
ON_
A)) 1and2

(
(OPTI
ON_
B)) 1and3

(
(OPTI
ON_
C)) 2and3
(
(OPTI
ON_
D)) Al
l

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) el
i
stwi
thnonodei
scal
l
edas
1)Emptyli
st
2)Nul
lli
st
3)Zer
olist

(
(OPTI
ON_
A)) 1and2

(
(OPTI
ON_
B)) 1and3

(
(OPTI
ON_
C)) 2and3

(
(OPTI
ON_
D)) Al
l

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ana
ON) ppl
i
cat
iont
hatmakeuseofMul
ti
li
nkedSt
ruct
ures
I
s__
___
___
_?

(
(OPTI
ON_
A))
Spar
semat
ri
x
(
(OPTI
ON_
B))
Li
nkedl
i
st

(
(OPTI
ON_
C))
Tr
ee

(
(OPTI
ON_
D))
St
ack

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Gi
ON) venaar
bit
rar
ypoi
ntert
oanel
ementi
nasi
ngl
yli
nked
l
i
st,
thet
imecompl
exi
tyf
ori
tsdel
eti
on_
___
___
___
_.

(
(OPTI
ON_
A))
O(
n/2)

(
(OPTI
ON_
B))
O(
n*n)

(
(OPTI
ON_
C))
O(
n)

(
(OPTI
ON_
D))
O(
n*n/
2)

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) nCl
anguaget
oimpl
ementt
hehet
erogeneousl
i
nked
l
i
st_
___
___
___poi
nteri
suse
(
(OPTI
ON_
A)) Voi
d

(
(OPTI
ON_
B)) Nul
l

(
(OPTI
ON_
C)) I
nt

(
(OPTI
ON_
D)) St
ruct
ure

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Se
ON) ar
chi
ngal
i
nkedl
i
str
equi
resl
i
nkedl
i
stbecr
eat
ed

(
(OPTI
ON_
A))
I
nsor
tedor
deronl
y

(
(OPTI
ON_
B))
I
nanyor
der

(
(OPTI
ON_
C))
Wi
thoutunderf
lowcondi
ti
on

(
(OPTI
ON_
D))
None

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTI
ONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) nli
nkedl
i
stt
hel
ogi
cal
orderofel
ement
s–

(
(OPTI
ON_
A))
i
ssameast
hei
rphy
sical
arr
angement

(
(OPTI
ON_
B))
Isnotnecessar
il
yequi
val
entt
othei
rphy
sical
arr
angement

(
(OPTI
ON_
C))
I
sdet
ermi
nedbyt
hei
rlogi
cal
arr
angement

(
(OPTI
ON_
D))
None

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ac
ON) cor
dingt
oSt
oragest
rat
egi
esLi
nkedl
i
sti
sa

(
(OPTI
ON_
A))
Nonl
i
near

(
(OPTI
ON_
B))
Li
near

(
(OPTI
ON_
C))
Sequent
ial

(
(OPTI
ON_
D))
dy
nami
c

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) I
mpl
ement
ati
onofal
i
sti
nady
nami
cfashi
oni
s

(
(OPTI
ON_
A))
Tocall
upont
hesyst
em t
oal
l
ocat
eandf
reest
oragemay
notbeti
meconsumi
ng

(
(OPTI
ON_
B))
Asetofnodesnotr
eser
vedi
nadv
ancef
oruse

(
(OPTI
ON_
C))
Theaddr
esscomput
ati
on i
scompl
ex

(
(OPTI
ON_
D))
None
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) fyouar
eusi
ng Cl
anguage t
oimpl
ementa
heter
ogeneousl
i
nkedl
i
st,
theoi
ntert
ypeuwi
l
lpr
eferi
s
___
_ _
___
(
(OPTI
ON_
A)) I
nt*

(
(OPTI
ON_
B)) nul
l

(
(OPTI
ON_
C)) Voi
d*

(
(OPTI
ON_
D)) Fl
oat
*

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
choft
hef
oll
owi
ngst
atementi
str
ue

(
(OPTI
ON_
A)) Thenextaddr
essf
iel
doft
henodecanbeempt
y

(
(OPTI
ON_
B)) Al
i
stcanexi
stwi
thnonodes

(
(OPTI
ON_
C)) Inasingl
yli
nkedli
stt
hestart
ingaddr
essoft
hel
i
sti
s
st
oredintheaddr
essfi
eldofthel
astnode
(
(OPTI
ON_
D)Al
) Alloft
heabove

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
)
Ty
peofst
oragei
susedt
orepr
esentLi
sts

(
(OPTI
ON_
A)) Random

(
(OPTI
ON_
B)) Sequent
ial

(
(OPTI
ON_
C)) Dy
nami
c

(
(OPTI
ON_
D)) Logi
cal

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
)
Thenodei
nasi
ngl
yli
nkedl
i
stcanbedel
eted,

(
(OPTI
ON_
A))
Wi
thoutt
rav
ersi
ngt
hel
i
st

(
(OPTI
ON_
B))
Byt
rav
ersi
ngt
hel
i
stf
rom t
hehead

(
(OPTI
ON_
C))
Byt
rav
ersi
ngt
hel
i
stf
rom t
het
ail

(
(OPTI
ON_
D))
Al
loft
heabov
e

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
choft
hef
oll
owi
ngoper
ati
onsi
snotef
fi
ci
ent
ly
suppor
ted
byasingl
y-l
i
nkedl
i
st?

(
(OPTI
ON_
A)) accessi
ngt
heel
ementi
nthecur
rentposi
ti
on

(
(OPTI
ON_
B)) i
nser
ti
onaf
tert
hecur
rentposi
ti
on

(
(OPTI
ON_
C)) i
nser
ti
onbef
oret
hecur
rentposi
ti
on

(
(OPTI
ON_
D)) movi
ngt
otheposi
ti
oni
mmedi
atel
yfol
l
owi
ngt
hecur
rent
posi
ti
on

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) ati
sanor
der
edl
i
st

(
(OPTI
ON_
A)w
)hWher
etheaddr
essi
sor
der
ed

(
(OPTI
ON_
B)w
)hwher
ethesmal
l
eri
temspr
ecedet
hel
argerones

(
(OPTI
ON_
C)) bot
haandb

(
(OPTI
ON_
D)n
)onone

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ac
ON) cor
dingt
oAccessst
rat
egi
esLi
nkedl
i
sti
sa

(
(OPTI
ON_
A)) Nonl
i
near

(
(OPTI
ON_
B)) Li
near

(
(OPTI
ON_
C)) Nonsequent
ial

(
(OPTI
ON_
D)) dynami
c

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ho
ON) wmanynodesar
eaccessed,
ont
heav
erage,
in
i
nser
ti
nganewel
ementi
ntoanor
der
edl
i
stwi
thnnodes

(
(OPTI
ON_
A)) (
n+1)
/2

(
(OPTI
ON_
B)) n/
2

(
(OPTI
ON_
C)) 1/
(n+1)

(
(OPTI
ON_
D)) None

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Apr i
ori
tyQueuei mpl
ement
edasanorderedl
inkedli
st
requi
resexaminingan aver
ageofappr
oximately_
____
__
nodesforinser
ti
on
(
(OPTI
ON_
A)) (n+1)
/2

(
(OPTI
ON_
B)) 1/
(n+1)

(
(OPTI
ON_
C)) n/
2

(
(OPTI
ON_
D)) one

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Apr i
ori
tyQueuei mpl
ement
edasanorder
edl
inkedl
ist
requi
resexamininganaver
ageofappr
oxi
mat
ely___
____
nodesfordel
etion
(
(OPTI
ON_
A)) (n+1)
/2

(
(OPTI
ON_
B)) 1/
(n+1)

(
(OPTI
ON_
C)) n/
2

(
(OPTI
ON_
D)) one

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) eadv
ant
ageofl
i
stsov
eranar
rayf
ori
mpl
ement
inga
pri
ori
tyqueuei
s
(
(OPTI
ON_
A)) Ext
raspaceshoul
dbel
eftempt
yint
heendt
oachi
evet
his

(
(OPTI
ON_
B)) Li
stswi
l
ltakel
esst
imecompar
edt
oar
ray
s

(
(OPTI
ON_
C)) Noshi
ft
ingofel
ement
sorgapsar
enecessar
yinal
i
st

(
(OPTI
ON_
D)) Li
stsdon’
thav
edi
rectaccess

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ani
ON) tem canbei
nser
tedi
nto_
___
__,
wit
houtmov
ingany
ot
heri
tems

(
(OPTI
ON_
A)) Li
st

(
(OPTI
ON_
B)) anar
rayi
fext
raspacei
slef
tempt
y

(
(OPTI
ON_
C)) bot
haandb

(
(OPTI
ON_
D)) none

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ane
ON) xt
ranodeatt
hef
rontoft
hel
i
st,
whi
chdoesnot
r
epresentanit
em i
nthel
i
sti
sCal
l
ed
(
(OPTI
ON_
A)) headernode

(
(OPTI
ON_
B)) Li
stnode

(
(OPTI
ON_
C)) Li
stheader

(
(OPTI
ON_
D)) Bot
haandc

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) A_ _
_____
___
isaself
-r
efer
ent
ial
datatypebecausei
t
cont
ainsapoint
erorl
inkt
oanotherdat
aofthesame
ty
pe.

(
(OPTI
ON_
A))
St
ack

(
(OPTI
ON_
B))
Li
nkedl
i
st

(
(OPTI
ON_
C))
Queue

(
(OPTI
ON_
D))
Pr
ior
it
yqueue

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) L
ON) i
nkedl
i
sts,
atanypoi
nti
nthel
i
sti
nconst
antt
ime,
does
notal
l
ow_
___
___
___
.
(
(OPTI
ON_
A)) Random Access

(
(OPTI
ON_
B)) I
nser
ti
on

(
(OPTI
ON_
C)) Del
eti
on

(
(OPTI
ON_
D)) I
nser
ti
onatend

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) _
ON) ___
___
___per
mit
sinser
ti
onandr
emov
alofnodesatany
pointi
nthel
i
sti
nconst
antt
ime,
butdonotal
l
owr
andom
access
(
(OPTI
ON_
A)) St
ack

(
(OPTI
ON_
B)) Li
nkedl
i
st

(
(OPTI
ON_
C)) Queue

(
(OPTI
ON_
D)) Pr
ior
it
yqueue

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Tot
ON) rav
ersea_
___
___
___
_,y
oubegi
natanynodeandf
oll
ow
thel
isti
neit
her di
rect
ionunt
ily
our
etur
ntot
he
ori
ginal
node.

(
(OPTI
ON_
A))
Twowayl
i
nkedl
i
st

(
(OPTI
ON_
B))
Ci
rcul
arl
i
nkedl
i
st

(
(OPTI
ON_
C)) Si
ngl
yli
nkedl
i
st
(
(OPTI
ON_
D)) None

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) epoi
nter
,incaseofaci
rcul
arl
i
nkedl
i
st,
poi
nti
ngt
othe
whol
eli
sti
susual
l
ycal
l
edt
he_
___
___
___
_.

(
(OPTI
ON_
A))
Doubl
epoi
nter

(
(OPTI
ON_
B))
Li
stpoi
nter

(
(OPTI
ON_
C))
Ci
rcul
arpoi
nter

(
(OPTI
ON_
D))
Endpoi
nter
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) na_
___
___
___
___
_,eachnodehasonel
i
nk,
simi
l
arl
ytoan
or
dinar
ysingl
y-
li
nkedl
i
st,
exceptthatt
henextl
i
nkoft
he
l
astnodepoint
sbackt
othefi
rstnode.

(
(OPTI
ON_
A))
Doubl
yli
nkedl
i
st

(
(OPTI
ON_
B))
Si
ngl
y-
cir
cul
arl
y-
li
nkedl
i
st

(
(OPTI
ON_
C))
Doubl
yci
rcul
arl
i
nkedl
i
st

(
(OPTI
ON_
D))
Twowayl
i
nkedl
i
st

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) na_
___
___
___
___
_,eachnodehast
wol
i
nks,
simi
l
arl
yto
doubl
y-
li
nkedli
st,
exceptthatpr
eviousl
inkofthefi
rst
nodepoi
ntstothelastnodeandthenextli
nkofthelast
nodepoi
ntstothefir
stnode.

(
(OPTI
ON_
A))
Doubl
y-
cir
cul
arl
y-
li
nkedl
i
st

(
(OPTI
ON_
B))
Doubl
yli
nkedl
i
st

(
(OPTI
ON_
C))
Si
ngl
y-
cir
cul
arl
y-
li
nkedl
i
st
(
(OPTI
ON_
D))
Twowayl
i
nkedl
i
st

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) na_
___
___
___
,inser
ti
onsandr
emov
alscanbedoneat
anypoi
ntwi
thaccesst
oanynear
bynode.

(
(OPTI
ON_
A))
Doubl
y-
cir
cul
arl
y-
li
nkedl
i
st

(
(OPTI
ON_
B))
Doubl
yli
nkedl
i
st

(
(OPTI
ON_
C))
Si
ngl
y-
cir
cul
arl
y-
li
nkedl
i
st

(
(OPTI
ON_
D))
Twowayl
i
nkedl
i
st

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) _
ON) ___
___
___
___
__ar
emostusef
ulf
ordescr
ibi
ngnat
ural
l
y
ci
rcul
arstr
uct
ures,andhavetheadv
antageofregul
ar
str
uctur
eandbeingabletotr
aver
setheli
stst
arti
ngatany
point
.
(
(OPTI
ON_
A))
Doubl
yli
nkedl
i
st

(
(OPTI
ON_
B))
Twowayl
i
nkedl
i
st

(
(OPTI
ON_
C))
Si
ngl
yli
nkedl
i
st

(
(OPTI
ON_
D))
Ci
rcul
arl
i
nkedl
i
st

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
choft
hef
oll
owi
ngoper
ati
onsi
snotef
fi
ci
ent
ly
support
edbyasingl
y-
li
nkedli
st?
(
(OPTI
ON_
A)) Accessi
ngtheel
ementinthecurr
entposi
ti
on

(
(OPTI
ON_
B)) I
nser
ti
onaf
tert
hecur
rentposi
ti
on

(
(OPTI
ON_
C)) I
nser
ti
onbef
oret
hecur
rentposi
ti
on

(
(OPTI
ON_
D)) Movi
ngt
otheposi
ti
oni
mmedi
atel
yfol
l
owi
ngt
hecur
rent
posi
ti
on

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) eheadernodeofal
i
nkedl
i
st

(
(OPTI
ON_
A)) Si
mpl
i
fiesdel
eti
on

(
(OPTI
ON_
B)) Si
mpl
i
fiesi
nser
ti
on

(
(OPTI
ON_
C)) Poi
ntst
onul
l

(
(OPTI
ON_
D)) Bot
h
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) faheadernodei
sused,
whi
choft
hef
oll
owi
ngi
ndi
cat
es
wi
thonei
tem?
(
(OPTI
ON_
A)) L.
Header
.Next=nul
l

(
(OPTI
ON_
B)) L.
Header
.Next/
=nul
l

(
(OPTI
ON_
C)) L.
Header
.Next/
=nul
landt
henL.
Header
.Next
.Next/
=nul
l

(
(OPTI
ON_
D)) L.
Header
.Next/
=nul
landt
henL.
Header
.Next
.Next=nul
l

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) nser
ti
onofanodei
ntoadoubl
yli
nkedl
i
str
equi
reshow
manychangest
ovar
iousNextandPr
evpoi
nter
s?

(
(OPTI
ON_
A)) Nochanges

(
(OPTI
ON_
B)) 1Next
,1Pr
ev

(
(OPTI
ON_
C)) 2Next
,2Pr
ev

(
(OPTI
ON_
D)) 3Next
,3Pr
ev

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) atoper
ati
oni
ssuppor
tedi
nconst
antt
imebyt
he
doubl
yli
nkedl
i
st,
butnotbyt
hesi
ngl
yli
nkedl
i
st?

(
(OPTI
ON_
A)) Advance

(
(OPTI
ON_
B)) Moveback

(
(OPTI
ON_
C)) Fi
rst

(
(OPTI
ON_
D)) Ret
ri
eve

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Co
ON) nsi
dert
hef
oll
owi
ngst
atement
s.
(i
)Al i
nkedlistconsi stsofaser iesofst r
uct ures,which
arenecessar i
l
yadj acenti nmemor y.
(i
i)Inasinglyli
nkedl i
st,eachst ructurecont ainsan
elementandar eferencet oar ecordcont ainingits
successor.
(i
ii)I
nanar r
ay -
basedl i
st,eveni fthear r
ayi sdy nami call
y
all
ocated,anest i
mat eoft hemaxi mum si zeoft helistis
requir
e
(i
v )I
nanar r
aybasedl i
st,inserti
ngatposi ti
on0r equires
fi
rstpushingtheent irear raydownonespott omake
room.
(v)Inanarray-basedl ist
, deleti
ngel ement sf rom the
mi ddl
ecanbeper formedwi thoutshift
ingt her emaining
elements.
Whi choftheabov est atement sis/arevalidf oralist
?
(
(OPTI
ON_
A))
(
ii
)&(
iv)onl
y

(
(OPTI
ON_
B))
(
ii
),(
ii
i)&(
iv)onl
y

(
(OPTI
ON_
C))
(
ii
i)
,(i
v)&(
v)onl
y

(
(OPTI
ON_
D))
(
ii
)&(
iv)onl
y

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Co
ON) nsi
dert
hef
oll
owi
ngoper
ati
ons.
(i
)Appendanel ementt otheendofal i
st.
(i
i)Concat enatetwol i
sts.
(i
ii)Freeall t
henodesi nal i
st.
(i
v )Reverseal i
st,sothatthelastelementbecomest he
fi
rstandso- on.
(v)Del et
et helastelementfrom alist.
(vi)Delet
et henthelementf rom ali
stwi t
hatleastn
element s.
(vii
)Combi netwoor deredli
stsintoasingleorder
edlist
.
Whi choft heabov earev al
idoperationsinsi
nglyli
nked
l
ists?

(
(OPTI
ON_
A)) (
i)
,(i
i
),(
ii
i)
,(v
),(
vi)&(
vii
)

(
(OPTI
ON_
B))
(
ii
i)
,(i
v),
(v)
,(v
i)&(
vii
)
(
(OPTI
ON_
C))
(
i)
,(i
i
),(
ii
i)
,(i
v),
(vi
)&(
vii
)

(
(OPTI
ON_
D))
(
i)
,(i
i
),(
ii
i)
,(i
v),
(v)
,(v
i)&(
vii
)

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Co
ON) nsi
dert
hef
oll
owi
ngal
gor
it
hm.
(i
)Anempt ynodeiscr eate
(i
i)Thenode’sinformat i
onf i
eldi
sinit
ializedtoani nteger
e1.
(i
ii
)Thenodei sbei ngincludedattheendoft heli
st, and
thenextfi
eldissett onull.
(i
v)Thenodei snowi ncl
udedi nthel
istbymaki ngt he
nextfi
eldofthelastnodeoft heli
star eferencetot he
newlycreatednode.
(v)Thenewnodef ollowsal l
thenodesoft heli
st,butt hi
s
facthastober efl
ect edi
nt heval
ueoft hetail
,whichnow
becomest hereferencet othenewnode.
Whichoft hefoll
owi ngdoest heaboveal gorit
hm
descri
be?

(
(OPTI
ON_
A)) Thepr
ocessofaddi
nganewnodet
othel
astnodeoft
he
t
ree
(
(OPTI
ON_
B))
Thepr
ocessofaddi
nganewnodet
oanyl
ocat
ionoft
he
l
ist

(
(OPTI
ON_
C))
Thepr
ocessofaddi
nganewnodet
otheendoft
hel
i
st

(
(OPTI
ON_
D))
Thepr
ocessofdel
eti
nganodef
rom t
heendoft
hel
i
st
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) nLi
nkedl
i
sti
mpl
ement
ati
on,
anodecar
ri
esi
nfor
mat
ion
r
egar
ding_
___
__?
(
(OPTI
ON_
A)) Li
nk

(
(OPTI
ON_
B)) Dat
aandLi
nk

(
(OPTI
ON_
C)) Dat
a

(
(OPTI
ON_
D)) Noneoft
heabov
e

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) AL
ON) i
nkedl
i
sti
nwhi
cht
hel
astnodeofLi
nkedl
i
stpoi
ntst
o
t
hef
ir
sti
scal
l
eda_
___
___
___

(
(OPTI
ON_
A)) Si
ngl
yLi
nkedLi
st

(
(OPTI
ON_
B)) Ci
rcul
arLi
nkedLi
st

(
(OPTI
ON_
C)) Noneoft
hese

(
(OPTI
ON_
D)) Doubl
yLi
nkedLi
st

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ad
ON) oubl
yli
nkedl
i
stper
for
mst
rav
ersal
in_
___
___
___
___
_

(
(OPTI
ON_
A)) Ci
rcul
ardi
rect
ion

(
(OPTI
ON_
B)) Anydi
rect
ion

(
(OPTI
ON_
C)) Ei
therdi
rect
ion

(
(OPTI
ON_
D)) For
war
ddi
rect
ion

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) L
ON) i
nkedl
i
stdat
ast
ruct
ureusageof
fer
sconsi
der
abl
e
sav
ingi
n

(
(OPTI
ON_
A)) Comput
ati
onal
time

(
(OPTI
ON_
B)) Spaceut
il
izat
ion&comput
ati
onal
time

(
(OPTI
ON_
C)) Spaceut
il
izat
ion

(
(OPTI
ON_
D)) Noneoft
heabov
e
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Co
ON) nsi
derl
i
nkedl
i
sti
susedt
oimpl
ementt
heSt
ackt
hen
whi
chofthef
oll
owi
ngnodei
sconsi
der
edasTopoft
he
St
ack?
(
(OPTI
ON_
A)) Anynode

(
(OPTI
ON_
B)) Fi
rstNode

(
(OPTI
ON_
C)) Mi
ddl
eNode

(
(OPTI
ON_
D)) LastNode

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) el
i
nkf
iel
dint
hel
astnodeoft
hel
i
nkedl
i
stcont
ains
_
___
_

(
(OPTI
ON_
A)) Zer
oval
ue

(
(OPTI
ON_
B)) Li
nkt
othef
ir
stnode

(
(OPTI
ON_
C)) Poi
ntert
othenextel
ementl
ocat
ion

(
(OPTI
ON_
D)) Dat
a
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) ennewel
ementi
saddedi
nthemi
ddl
eofSLLt
hen
_
___
_

(
(OPTI
ON_
A)) Onl
yel
ement
sthatappearbef
oret
henewel
ementneed
tobemov ed
(
(OPTI
ON_
B)) Onlyelement
sthatappearaf
tert
henewel
ementand
beforeneedt
obemov e
(
(OPTI
ON_
C)) Non eedtomoveelement

(
(OPTI
ON_
D)) Onl
yel
ement
sthatappearaf
tert
henewel
ementneedt
o
bemov
e
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
choft
hef
oll
owi
ngoper
ati
oni
sper
for
medmor
e
ef
fi
cientl
yinDLL?
(
(OPTI
ON_
A)) Del
etinganodeatgi
venposi
ti
on

(
(OPTI
ON_
B)) Sear
chi
nganodeatgi
venposi
ti
on

(
(OPTI
ON_
C)) Noneoft
hese

(
(OPTI
ON_
D)) I
nser
ti
nganodeatgi
venposi
ti
on

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) final
i
nkedl
i
staddr
essoff
ir
stnodei
s1020t
henwhat
wi
l
lbet
headdr
essofnodeat5t
hposi
ti
on

(
(OPTI
ON_
A)) 1028

(
(OPTI
ON_
B)) 1036

(
(OPTI
ON_
C)) Noneoft
hese

(
(OPTI
ON_
D)) 1040
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) nCi
rcul
arl
i
nkedl
i
sti
nser
ti
onofanodei
nvol
vest
he
modi
fi
cat
ionof_
___
__l
i
nks.
(
(OPTI
ON_
A)) 4

(
(OPTI
ON_
B)) 1

(
(OPTI
ON_
C)) 2

(
(OPTI
ON_
D)) 3

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
)
Considert
hef
oll
owingl
i
nkedl
i
str
epr
esent
ati
on-
str
uctnode
{
i
ntdata;
str
uctnode*
next;
}st
art=NULL;

st
ructnode*
new_
node;

Whichoft
hef
oll
owi
ngst
atementi
susedt
ocr
eat
ea
node?

(
(OPTI
ON_
A)) new_
node=(
str
uctnode*
)mal
l
oc(
sizeof
(st
ructnode)
);

(
(OPTI
ON_
B)) new_
node=(
str
uct*
)mal
l
oc(
sizeof
(st
ructnode)
);

(
(OPTI
ON_
C)) new_
node=(
str
uctnode)mal
l
oc(
sizeof
(st
ructnode)
);

(
(OPTI
ON_
D)) new_
node=(
str
uctnode*
)mal
l
oc(
sizeof
(st
ructnode*
));

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) .
ON) st
ructnode
{
i
ntdata;
st
ructnode*
next
;
}
*start
;
Consi
dertheabover
epresentat
ionandpredi
ctwhatwil
l
bepri
ntedonthescr
eenbyf oll
owingst
atement:st
art
-
>next
->data?

(
(OPTI
ON_
A)) Accesst
he"
dat
a"f
iel
dof3r
dnode

(
(OPTI
ON_
B)) Accesst
he"
dat
a"f
iel
dof2ndnode

(
(OPTI
ON_
C)) Accesst
he"
dat
a"f
iel
dof1stnode

(
(OPTI
ON_
D)) Noneoft
hese
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) s
ON) t
ructnode*cur
rent=st
art
->next
what"cur
rent
"wi
l
lcont
aini
fiti
svar
iabl
eoft
ypest
ruct
node?

(
(OPTI
ON_
A)) Dat
aFi
eldof2ndnode

(
(OPTI
ON_
B)) Addr
essof2ndnode

(
(OPTI
ON_
C)) Addr
essf
iel
dof2ndnode

(
(OPTI
ON_
D)) noneoft
hese

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) 1
ON) 64.Consi
dert
hef
oll
owi
ngl
i
nkedl
i
st

andf ol
l
owingl
i
nkedl i
str
epr
esent
ati
on
str
uctnode{
intdata;
structnode*next
;
}*
start;

whatwi
l
ltbev
alueoff
oll
owi
ngst
atement
?

st
art
->next
->next
->next
->dat
a

(
(OPTI
ON_
A)) 12

(
(OPTI
ON_
B)) 25

(
(OPTI
ON_
C)) 15
(
(OPTI
ON_
D)) 30

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
)
I2 I 2
~-

L 3225 3226

12~1:: L171~-ul
5:.57~ 5572

Ifst
artispointi
ngtof i
rstnodeoftheli
nkedl
istt
hen
considerthefoll
owingstatement-
star
t=st art
->next
;
curr
ent=st art-
>next
Whatwi llbethevalueofaddressfi
eldofcur
rent
?

(
(OPTI
ON_
A)) 2184

(
(OPTI
ON_
B)) 3225

(
(OPTI
ON_
C)) 5572

(
(OPTI
ON_
D)) 5571

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
choft
hef
oll
owi
ngi
scor
rectsy
ntaxt
opr
intl
i
nkedl
i
st

(
(OPTI
ON_
A)) st
ructnode*
temp;
do{
pri
ntf
("%d"
,t
emp- >dat;
temp=t emp->next;
}
while(
temp!=NULL) ;

(
(OPTI
ON_
B)) st
ructnode* t
emp=st art;
do{
pri
ntf
("%d"
,t
emp- >dat;
temp=t emp->next;
}while(
temp!=NULL) ;

(
(OPTI
ON_
C)) st
ructnode*
temp=st
art
;
do{
temp=t emp->next;
pri
ntf
("%d"
,t
emp- >dat;
}
while(
temp!=NULL) ;

(
(OPTI
ON_
D)) st
ructnode*
temp;
do{
temp=t emp->next;
pri
ntf
("%d"
,t
emp- >dat;
}
whi l
e(t
emp!=NULL) ;

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) ConsidertheSLLhavi
ngnelements.Whatwil
lbethe
ti
met akentoaddannodeattheendofli
nkedli
sti
f
Point
erisini
ti
all
ypoi
nti
ngt
of i
rstnodeoft
heli
st.

(
(OPTI
ON_
A)) O(
n-1)

(
(OPTI
ON_
B)) O(
1)
2
(
(OPTI
ON_
C)) O(
n)

(
(OPTI
ON_
D)) O(
n)

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
)
Whi
choft
hef
oll
owi
ngst
atementi
str
ue?

a.Usi
ngsingl
yli
nkedl
i
standci
rcul
arl
i
st,
i
tispossi
blet
otr
avel
s
backwar
ds.

b.tof
indt
hepredecessoriti
srequi
ret
otr
avel
sthel
i
stf
rom f
ir
st
nodei
ncaseofsinglyl
inkedli
st

(
(OPTI
ON_
A))
Onl
ya

(
(OPTI
ON_
B)) Onl
yb

(
(OPTI
ON_
C)) Bot
ha&b

(
(OPTI
ON_
D)) Noneofabov
e
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
)
Thedi
sadv
ant
agesofci
rcul
arl
i
nkedl
i
sti
s

(
(OPTI
ON_
A))
i
tispossi
blet
ogeti
ntoi
nfi
nit
eloop

(
(OPTI
ON_
B))
l
asti
spoi
nti
ngt
ofi
rstnode

(
(OPTI
ON_
C))
t
imeconsumi
ng

(
(OPTI
ON_
D))
r
equi
redmor
ememor
yspace

(
(CORRECT_
C
HOI
CE)) A
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
)
Deleti
onofanodeinalinkedl
i
sti
nvolv
eskeepi
ngt
rackof
addressofnodewhichcomeimmediatel
y

(
(OPTI
ON_
A))
af
tert
henodet
hati
stobedel
ete
(
(OPTI
ON_
B))
bef
oret
henodet
hati
stobedel
eted

(
(OPTI
ON_
C))
af
tert
hemi
ddl
enode

(
(OPTI
ON_
D))
Noneofabov
e

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
)
I
nadoubl
yli
nkedl
i
stt
rav
ersi
ngcomet
oahal
tat
:

(
(OPTI
ON_
A)) Nul
l
(
(OPTI
ON_
B))
f
ront

(
(OPTI
ON_
C))
Rear

(
(OPTI
ON_
D))
Rear
-1

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
)
LetPbeasinglyl
i
nkedli
st.LetQbethepoint
ertoan
i
nter
mediat
enodexi nt
hel i
st.Whati
stheworst
-case
ti
mecomplexit
yofthebestknownalgor
it
hm todelet
ethe
nodexfr
om theli
st?

(
(OPTI
ON_
A))
O(
1)

(
(OPTI
ON_
B)) O(
log2n)

(
(OPTI
ON_
C)) O(
logn)

(
(OPTI
ON_
D)) O(
n)

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
)
Whataretheti
mecomplexi
ti
esoffindi
ng8thel
ementfrom
begi
nningand8thel
ementfr
om endinasingl
yli
nkedl
ist?
Letnbe
thenumberofnodesinl
i
nkedli
st,
youmayassumet hatn>8.

(
(OPTI
ON_
A)) O(
1)andO(
n)

(
(OPTI
ON_
B)) O(
1)andO(
1)

(
(OPTI
ON_
C)) O(
n)andO(
1)
(
(OPTI
ON_
D))
O(
n)andO(
n)

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
)
.Consi
dert
hef
oll
owi
ngf
unct
iont
otr
aver
seal
i
nkedl
i
st.

v
oidtraverse(
str
uctNode* hea
{
whil
e(head->next!=NULL)
{
pri
ntf(
"%d ",
head->dat
;
head=head- >next
;
}
}

Whi
choft
hef
oll
owi
ngi
sFALSEaboutabov
efunct
ion?

(
(OPTI
ON_
A)) Thef
unct
ionmaycr
ashwhent
hel
i
nkedl
i
sti
sempt
y

(
(OPTI
ON_
B)) Thef
unct
iondoesn’
tpr
intt
hel
astnodewhent
hel
i
nkedl
i
sti
snot
empt
y

(
(OPTI
ON_
C)) Thef
unct
ioni
simpl
ement
edi
ncor
rect
lybecausei
tchangeshead

(
(OPTI
ON_
D)) Noneoft
heabov
e

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
)
Youaregivenpointerst
ofir
standlastnodesofasi
ngl
y
l
inkedli
st,whi
choft hefol
l
owingoperati
onsare
dependentonthelengthofthel
inkedli
st?

(
(OPTI
ON_
A)) Del
etet
hef
ir
stel
ement
(
(OPTI
ON_
B)) I
nser
tanewel
ementasaf
ir
stel
ement
(
(OPTI
ON_
C)) Del
etet
hel
astel
ementoft
hel
i
st
(
(OPTI
ON_
D))
Addanewel
ementatt
heendoft
hel
i
st

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
)
Giv
enpoi nt
ertoanodeXi nasingl
yli
nkedli
st.Onlyone
poi
nterisgiven,
poi
ntert
oheadnodei snotgi
v en,
canwe
del
etethenodeXf r
om givenl
i
nkedl i
st?
.

(
(OPTI
ON_
A)) Possi
blei
fXi
snotl
astnode
(
(OPTI
ON_
B))
Usefol
lowi
ngtwosteps1.Copyt
hedataofnextofXtoX.
2Delet
enextofX.Usefol
lowi
ngtwosteps1.Copyt
he
dat
aofnextofXtoX.2.Delet
enextofX.
(
(OPTI
ON_
C)) Possi
blei
fsi
zeofl
i
nkedl
i
sti
sodd

(
(OPTI
ON_
D)) Possi
blei
fXi
snotf
ir
stnode.
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
)
I
sitpossi
blet
ocreat
eadoubl
yli
nkedl
i
stusi
ngonl
yone
poi
nterwi
thever
ynode.

(
(OPTI
ON_
A)) NotPossi
ble
(
(OPTI
ON_
B)) Yes,
possi
blebyst
ori
ngXORofaddr
essesofpr
evi
ous
andnextnodes.
(
(OPTI
ON_
C)) Yes,
possi
blebyst
ori
ngXORofcur
rentnodeandnext
node
(
(OPTI
ON_
D))
Yes,
possi
blebyst
ori
ngXORofcur
rentnodeandpr
evi
ous
node

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
)
Intheworstcase,thenumberofcompar
isonsneededto
searchasingl
ylinkedli
stofl
engt
hnforagivenelement
i
s( GATECS2002)

(
(OPTI
ON_
A))
n

(
(OPTI
ON_
B)) n/
2

(
(OPTI
ON_
C)) .l
og2n
(
(OPTI
ON_
D)) l
og2n–1

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
choft
hef
oll
owi
ngsor
ti
ngal
gor
it
hmscanbeusedt
o
sor
tar
andom l
i
nkedl
i
stwi
thmi
nimum t
imecompl
exi
ty?

(
(OPTI
ON_
A)) I
nser
ti
onSor
t
(
(OPTI
ON_
B)) Qui
ckSor
t
(
(OPTI
ON_
C)) HeapSor
t
(
(OPTI
ON_
D)) Mer
geSor
t

(
(OPTI
ON_
E)) Al
labov
e

(
(CORRECT_
C E
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
choft
hef
oll
owi
ngpoi
ntsi
s/ar
etr
ueaboutLi
nkedLi
st
dat
astructurewhenitiscomparedwithar
ray
(
(OPTI
ON_
A)) Arr
ayshav ebett
ercachelocal
it
ythatcanmaket
hem
bet
teri
nt ermsofperformance.
(
(OPTI
ON_
B)) I
tiseasyt
oinser
tanddel
eteel
ement
sinLi
nkedLi
st
(
(OPTI
ON_
C)) Random accessi
snotal
l
owedi
nat
ypi
cal
impl
ement
ati
on
ofLi
nkedLi
sts
(
(OPTI
ON_
D)) Thesi
zeofar
rayhast
obepr
e-deci
ded,
li
nkedl
i
stscan
changethei
rsi
zeanyt
ime.
(
(OPTI
ON_
E)) Alloft
heabove

(
(CORRECT_
C E
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) atdoest
hef
oll
owi
ngf
unct
iondof
oragi
venLi
nked
Listwit
hfi
rstnodeashead?
voidfun1(
str
uctnode*hea
{
i
f (
head==NULL)
retur
n;

fun1(
head->next
);
pri
ntf
("%d ",
head->dat
;
}

(
(OPTI
ON_
A)) Pr
int
sal
lnodesofl
i
nkedl
i
sts
(
(OPTI
ON_
B)) Pr
int
sal
lnodesofl
i
nkedl
i
sti
nrev
erseor
der

(
(OPTI
ON_
C)) Pr
int
sal
ter
nat
enodesofLi
nkedLi
st

(
(OPTI
ON_
D)) Pr
int
sal
ter
nat
enodesi
nrev
erseor
der

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) E
ON) achNodecont
ainmi
nimum t
wof
iel
dsonef
iel
dcal
l
ed
dat
afi
eldt
ost
oredat
aAnot
herf
iel
disoft
ype_
___
___
__.

(
(OPTI
ON_
A)) Poi
ntert
ochar
act
er

(
(OPTI
ON_
B)) poi
ntert
oani
nteger

(
(OPTI
ON_
C)) poi
ntert
onode

(
(OPTI
ON_
D)) Poi
ntert
ocl
ass

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) L
ON) i
nkedl
i
sti
sgener
all
yconsi
der
edasanexampl
eof
__
___
____t
ypeofmemor
yal
l
ocat
ion.
(
(OPTI
ON_
A)) Compil
eTi
me

(
(OPTI
ON_
B)) Dy
nami
c
(
(OPTI
ON_
C)) St
ati
c

(
(OPTI
ON_
D)) Noneoft
hese

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
choft
hef
oll
owi
ngi
snotat
ypeofLi
nkedLi
st?

(
(OPTI
ON_
A)) Hy
bri
dLi
nkedLi
st

(
(OPTI
ON_
B)) Si
ngl
yLi
nkedLi
st

(
(OPTI
ON_
C)) Doubl
yLi
nkedLi
st

(
(OPTI
ON_
D)) Ci
rcul
arLi
nkedLi
st

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Al
ON) i
nearcol
l
ect
ionofdat
ael
ementgi
venbymeanof
point
eri
scal
l
ed
(
(OPTI
ON_
A)) Stack

(
(OPTI
ON_
B)) Li
nkedLi
st

(
(OPTI
ON_
C)) Queue
(
(OPTI
ON_
D)) Gr
aph

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) .
ON) Gener
all
ycol
l
ect
ionofNodesi
scal
l
edas_
___
___
___

(
(OPTI
ON_
A)) Poi
nter

(
(OPTI
ON_
B)) St
ack

(
(OPTI
ON_
C)) Li
nkedl
i
st

(
(OPTI
ON_
D)) Heap

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) nal
i
nkedl
i
stwi
thnnodes,
thet
imet
akent
oinser
tan
el
ementaf
teranel
ementpoi
ntedby
somepoi
nteri
s

(
(OPTI
ON_
A)) O(
1)

(
(OPTI
ON_
B)) O(
logn)

(
(OPTI
ON_
C)) O(
n)

(
(OPTI
ON_
D)) O(
n1ogn)
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) naci
rcul
arl
i
nkedl
i
st

(
(OPTI
ON_
A)) component
sar
eal
ll
inkedt
oget
heri
nsomesequent
ial
manner

(
(OPTI
ON_
B)) t
her
eisnobegi
nni
ngandnoend

(
(OPTI
ON_
C)) component
sar
ear
rangedhi
erar
chi
cal
l
y.

(
(OPTI
ON_
D)) f
orwar
dandbackwar
dtr
aver
sal
wit
hint
hel
i
sti
sper
mit
ted

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Co
ON) nsi
deral
i
nkedl
i
stofnel
ement
s.Whati
sthet
ime
takent
oinsertanel
ementaf
teranel
ementpoi
ntedby
somepointer
?

(
(OPTI
ON_
A)) O(
1)

(
(OPTI
ON_
B)) O(
log2n)

(
(OPTI
ON_
C)) O(
n)

(
(OPTI
ON_
D)) O(
nlog2n)
(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
choft
hef
oll
owi
ngoper
ati
onsi
sper
for
medmor
e
ef
fi
cient
lybydoubl
yli
nkedl
i
stt
hanbysi
ngl
yli
nkedl
i
st?

(
(OPTI
ON_
A)) Del
eti
nganodewhosel
ocat
ioni
ngi
ven

(
(OPTI
ON_
B)) Sear
chi
ngofanunsor
tedl
i
stf
oragi
veni
tem

(
(OPTI
ON_
C)) I
nver
ti
nganodeaf
tert
henodewi
thgi
venl
ocat
ion

(
(OPTI
ON_
D)) Tr
aver
singal
i
stt
opr
ocesseachnode

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Al
ON) i
nearcol
l
ect
ionofdat
ael
ement
swher
ethel
i
nearnode
i
sgivenbymeansofpoi
nteri
scal
l
ed
(
(OPTI
ON_
A)) l
inkedli
st

(
(OPTI
ON_
B)) nodel
i
st

(
(OPTI
ON_
C)) pr
imi
ti
vel
i
st

(
(OPTI
ON_
D)) Noneoft
hese

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) E
ON) achnodecont
ainmi
nimum t
wof
iel
dsonef
iel
dcal
l
ed
dat
afi
eldt
ost
oredatAnot
herf
iel
disoft
ype_
___
___
__
(
(OPTI
ON_
A)) Poi
ntert
ochar
act
er
(
(OPTI
ON_
B)) Poi
ntert
oCl
ass
(
(OPTI
ON_
C)) Poi
ntert
oNode
(
(OPTI
ON_
D)) Poi
ntert
oInt
eger
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) L
ON) i
nkedl
i
sti
sgener
all
yconsi
der
edasanexampl
eof
__
___
_____
___t
ypeofmemor
yal
l
ocat
ion.
(
(OPTI
ON_
A)) Compil
eTime

(
(OPTI
ON_
B)) Noneoft
hese

(
(OPTI
ON_
C)) St
ati
c

(
(OPTI
ON_
D)) dynami
c

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTI
ONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Wh
ON) i
choft
hef
oll
owi
ngi
snotat
ypeofLi
nkedLi
st?

(
(OPTI
ON_
A)) DLL
(
(OPTI
ON_
B)) Hy
bri
dLi
nkedl
i
st

(
(OPTI
ON_
C)) SLL

(
(OPTI
ON_
D)) Ci
rcul
arl
i
nkedl
i
st

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) AL
ON) i
nearcol
l
ect
ionofdat
ael
ementgi
venbymeanof
point
eri
scal
l
ed_
___
___
_?
(
(OPTI
ON_
A)) Graph

(
(OPTI
ON_
B)) Queue

(
(OPTI
ON_
C)) St
ack

(
(OPTI
ON_
D)) Li
nkedl
i
st

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ge
ON) ner
all
ycol
l
ect
ionofnodesi
scal
l
edas_
___
___
_?

(
(OPTI
ON_
A)) Heap

(
(OPTI
ON_
B)) Li
nkedl
i
st

(
(OPTI
ON_
C)) poi
nter

(
(OPTI
ON_
D)) St
ack

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ti
ON) mer
equi
ret
ofi
ndanyel
ementoft
hel
i
nkedl
i
sti
s
_
___
___
_?

(
(OPTI
ON_
A)) Noneoft
hese

(
(OPTI
ON_
B)) O(
n)

(
(OPTI
ON_
C)) O(
1)
2
(
(OPTI
ON_
D)) O(
n)

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI ) Th
ON) econcat
enat
ionoft
wol
i
stsi
stobeper
for
medi
nO(
1)
ti
me.Whi
chofthef
oll
owi
ngi
mpl
ement
ati
onsofal
i
st
coul
dbeused?

(
(OPTI
ON_
A)) SLL

(
(OPTI
ON_
B)) DLL

(
(OPTI
ON_
C)) Ar
rayi
mpl
ement
ati
onofLi
st

(
(OPTI
ON_
D)) Ci
rcul
arDLL

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Co
ON) nsi
deral
i
nkedl
i
stofnel
ement
s.whati
sthet
ime
takentoi
nser
tanel
ementaf
terel
ementpoi
ntedbysame
point
er?
(
(OPTI
ON_
A)) O(
1)
(
(OPTI
ON_
B)) O(
logn)

(
(OPTI
ON_
C)) O(
n)

(
(OPTI
ON_
D)) O(
n-1)

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Po
ON) i
nteri
spoi
nti
ngt
othef
ir
stel
ementoft
henodet
hen
t
imer equi
redt
oinser
tel
ementt
osecondposi
ti
oni
s
__
___ _
____
_?
2
(
(OPTI
ON_
A)) O(n)

(
(OPTI
ON_
B)) O(
1)

(
(OPTI
ON_
C)) O(
n-1)

(
(OPTI
ON_
D)) O(
n)

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) St
ON) acki
sal
soknownas.
..
..
..
..
..
..
..
dat
ast
ruct
ure

(
(OPTI
ON_
A)) LI
FO

(
(OPTI
ON_
B)) FI
FO

(
(OPTI
ON_
C)) UFO

(
(OPTI
ON_
D)) CI
FO

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) St
ON) acki
sal
soknownas.
..
..
..
..
..
..
..
.dat
ast
ruct
ure

(
(OPTI
ON_
A)) FI
LO

(
(OPTI
ON_
B)) FI
FO

(
(OPTI
ON_
C)) UFO

(
(OPTI
ON_
D)) CI
FO

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) ……..
..
..
…….
isi
ntegr
alpar
tof“
funct
ioncal
landr
etur
n”pr
ocessi
n
C/C++

(
(OPTI
ON_
A)) Ar
ray

(
(OPTI
ON_
B)) Li
st

(
(OPTI
ON_
C)) St
ack

(
(OPTI
ON_
D)) Queue

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Local
ON) v
ari
abl
esofanyf unct
iondur
ingpr
ogr
am execut
ionar
e
stor
edon..
..
..
..
..
..
..
..
..
.

(
(OPTI
ON_
A)) Sy
stem St
ack

(
(OPTI
ON_
B)) Sy
stem Ar
ray

(
(OPTI
ON_
C)) Sy
stem Queue

(
(OPTI
ON_
D)) Har
ddi
sk

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Addi
nganel
ementt
ost
acki
sknownas.
..
..
..
..
..
..
..
oper
ati
on

(
(OPTI
ON_
A)) PUSH

(
(OPTI
ON_
B)) POP

(
(OPTI
ON_
C)) TOP

(
(OPTI
ON_
D)) ADDI
TION

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Remov
inganel
ementf
rom st
acki
sknownas.
..
..
..
..
..
..
..
oper
ati
on

(
(OPTI
ON_
A)) PUSH

(
(OPTI
ON_
B)) POP

(
(OPTI
ON_
C)) TOP

(
(OPTI
ON_
D)) ADDI
TION

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Theendatwhi
chel
ement
sar
eaddedt
ost
acki
sknownas…………….
.

(
(OPTI
ON_
A)) TOP
(
(OPTI
ON_
B)) POP

(
(OPTI
ON_
C)) REAR

(
(OPTI
ON_
D)) FRONT

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Theendfr
om whi
chel
ement
sar
eremov
edf
rom st
acki
sknown
as……………..

(
(OPTI
ON_
A)) TOP

(
(OPTI
ON_
B)) POP

(
(OPTI
ON_
C)) REAR

(
(OPTI
ON_
D)) FRONT

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) St
ackcanbei
mpl
ement
edwi
th.
..
..
..
..
..
..
..
..

(
(OPTI
ON_
A)) Ar
ray

(
(OPTI
ON_
B)) Li
nkedLi
st

(
(OPTI
ON_
C)) Bot
hAandB

(
(OPTI
ON_
D)) Noneoft
heabov
e
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) PUSHoperat
ionofastackimpl
ement
edwi
thSi
ngl
yLi
nkedLi
st
(SLL)i
snot
hingbut
..
..
..
..
..
.

(
(OPTI
ON_
A)) Addatbegi
nofSLL

(
(OPTI
ON_
B)) AddatendofSLL

(
(OPTI
ON_
C)) Addatmi
ddl
eofSLL

(
(OPTI
ON_
D)) Noneoft
heabov
e

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) POPoper
ati
onofast acki
mpl
ement
edwi
thSi
ngl
yLi
nkedLi
st(
SLL)
i
snot
hingbut
..
..
..
..
..
.

(
(OPTI
ON_
A)) Del
eteatbegi
nofSLL

(
(OPTI
ON_
B)) Del
eteatendofSLL

(
(OPTI
ON_
C)) Del
eteatmi
ddl
eofSLL

(
(OPTI
ON_
D)) Noneoft
heabov
e

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Fol
lowi
ngdatast
ruct
ureisusedt
ocheckwhet
heranexpr
essi
on
hasmatchi
ngpar
enthesi
sornot.
(
(OPTI
ON_
A)) Ar
ray

(
(OPTI
ON_
B)) Li
nkedLi
st

(
(OPTI
ON_
C)) Queue

(
(OPTI
ON_
D)) St
ack

(
(CORRECT_
CH D
OI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

1
(
(MARKS))
(
1/2/
3..
.)

(
(QUESTI
ON)
) Foreval
uat
ionofpost
fi
xexpr
essi
on……………….
.dat
ast
ruct
urei
s
used.

(
(OPTI
ON_
A)) Ar
ray

(
(OPTI
ON_
B)) Li
nkedLi
st

(
(OPTI
ON_
C)) Queue

(
(OPTI
ON_
D)) St
ack

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Anarraywhichi
srest
ri
ctedforreadandwr
it
eusageatal
ltheends
exceptoneendi
snothingbut…………

(
(OPTI
ON_
A)) Ar
ray

(
(OPTI
ON_
B)) Rest
ri
ctedAr
ray

(
(OPTI
ON_
C)) Queue

(
(OPTI
ON_
D)) St
ack

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) ASi
nglyl
inkedli
sthasapoint
erpoint
ingt
oit
sfi
rstelement
.Ifwe
r
est
ri
ctadditi
onanddelet
ionofel
ementsonl
yatfi
rstposi
ti
onthen
i
tgi
vesaccessordersameas…….

(
(OPTI
ON_
A)) Sat
ck

(
(OPTI
ON_
B)) Si
ngl
yLi
nkedLi
st

(
(OPTI
ON_
C)) Queue

(
(OPTI
ON_
D)) Tr
ee

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) ASi
nglyl
inkedli
sthasapoi
nterpoi
nti
ngtoit
sfi
rstelement
.Ifwe
r
est
ri
ctadditi
onanddel
eti
onofelementsonl
yatfi
rstposi
ti
onthen
i
tgi
ves..
..
..
…….

(
(OPTI
ON_
A)) LI
FOor
der

(
(OPTI
ON_
B)) FI
FOor
der

(
(OPTI
ON_
C)) Random or
der

(
(OPTI
ON_
D)) UFOOr
der

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)
) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) ASi
nglyl
inkedli
sthasapoi
nterpoi
nti
ngtoit
sfi
rstelement
.Ifwe
r
est
ri
ctadditi
onanddel
eti
onofelementsonl
yatfi
rstposi
ti
onthen
i
tgi
ves..
..
..
…….

(
(OPTI
ON_
A)) FI
LOor
der

(
(OPTI
ON_
B)) LI
FOor
der

(
(OPTI
ON_
C)) Random or
der

(
(OPTI
ON_
D)) Bot
hAandB

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Thecasewit
hwhi
chr
ecur
siont
ermi
nat
esi
sknownas.
..
..
..
..
..
.of
recur
sion

(
(OPTI
ON_
A)) BASECASE

(
(OPTI
ON_
B)) BESTCASE

(
(OPTI
ON_
C)) AVERAGECASE

(
(OPTI
ON_
D)) WORSTCASE

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
) Recur
sionwor
kswi
tht
hehel
pof.
..
..
..
..
..
..
..
..
..
..
..
dat
a
st
ruct
ure

(
(OPTI
ON_
A)) Ar
ray

(
(OPTI
ON_
B)) Li
st
(
(OPTI
ON_
C)) Queue
(
(OPTI
ON_
D)) St
ack
(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Sy
stem St
acki
spar
tof
………….
..

(
(OPTI
ON_
A)) RAM

(
(OPTI
ON_
B)) ROM

(
(OPTI
ON_
C)) Har
ddi
sk

(
(OPTI
ON_
D)) Cache

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
) Whenaf
unct
ioncal
l
sit
sel
f,i
tisknownas……….

(
(OPTI
ON_
A)) Sel
fRef
erent
ial

(
(OPTI
ON_
B)) Recur
sion

(
(OPTI
ON_
C)) Repeat
edCal
l

(
(OPTI
ON_
D)) Loop

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) I
ndi
rectr
ecur
sioni
sal
socal
l
edas……………………

(
(OPTI
ON_
A)) Mut
ual
Recur
sion

(
(OPTI
ON_
B)) Redi
rectRecur
sion

(
(OPTI
ON_
C)) Tai
lRecur
sion

(
(OPTI
ON_
D)) Noneoft
heAbov
e

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Mut
ual
recur
sioni
sal
socal
l
edas……………………

(
(OPTI
ON_
A)) I
ndi
rectRecur
sion
(
(OPTI
ON_
B)) Redi
rectRecur
sion

(
(OPTI
ON_
C)) Tai
lRecur
sion

(
(OPTI
ON_
D)) Noneoft
heAbov
e

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Arecur
siv
efuncti
onissai
dtobe…………….r
ecur
sivei
fther
eareno
pendi
ngoper
ationst
obeperfor
medonret
urnfr
om arecursi
vecal
l
.

(
(OPTI
ON_
A)) End

(
(OPTI
ON_
B)) Tai
l

(
(OPTI
ON_
C)) Li
near

(
(OPTI
ON_
D)) Bi
nar
y

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)
(
(QUESTI
ON)
) Thesi
mpl
estf
orm ofRecur
sioni
s…………………

(
(OPTI
ON_
A)) Li
nearRecur
sion

(
(OPTI
ON_
B)) I
ndi
rectRecur
sion

(
(OPTI
ON_
C)) Mut
ual
Recur
sion

(
(OPTI
ON_
D)) Tai
lRecur
sion

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) Fact
(n)

Begi
n

I
f(n<=1)r
etur
n1;

El
ser
etur
nn*f
act
(n-
1)

End

(
(OPTI
ON_
A)) Funct
ioni
sexampl
eofDi
rectRecur
sion

(
(OPTI
ON_
B)) Funct
ioni
sexampl
eofI
ndi
rectRecur
sion

(
(OPTI
ON_
C)) Funct
ioni
sexampl
eofMut
ual
Recur
sion

(
(OPTI
ON_
D)) Bot
hAandB

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) Fact
(n)

Begi
n

I
f(n<=1)r
etur
n1;

El
ser
etur
nn*Dummy(
n-1)

End

Dummy(
n)

Begi
n

Fact
(n)

End

(
(OPTI
ON_
A)) Funct
ioni
sexampl
eofDi
rectRecur
sion

(
(OPTI
ON_
B)) Funct
ioni
sexampl
eofI
ndi
rectRecur
sion

(
(OPTI
ON_
C)) Funct
ioni
sexampl
eofMut
ual
Recur
sion

(
(OPTI
ON_
D)) Bot
hCandB

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)
(
(QUESTI
ON)
) Ast
ackf
ramei
nrecur
sionconsi
stsof
..
..
..
..
..
..
..
..
.

(
(OPTI
ON_
A)) Par
amet
erst
obepr
ocessedbyt
hecal
l
edf
unct
ion

(
(OPTI
ON_
B)) Local
var
iabl
esi
nthecal
l
ingf
unct
ion

(
(OPTI
ON_
C)) Ther
etur
naddr
ess

(
(OPTI
ON_
D)) Al
labov
e

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) nrecur
siv
ecal
lther
etur
naddr
essofcal
l
edf
unct
ioni
s
st
oredon.
..
..
..
..
..
..

(
(OPTI
ON_
A)) St
ackf
rame

(
(OPTI
ON_
B)) Queue

(
(OPTI
ON_
C)) Tr
ee

(
(OPTI
ON_
D)) Cache

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whenrecur
siv
ecal
li
sthel
astst
atementi
nthef
unct
ion,
iti
s
cal
l
ed………………….

(
(OPTI
ON_
A)) Endr
ecur
sion

(
(OPTI
ON_
B)) Tai
lRecur
sion

(
(OPTI
ON_
C)) BaseCase

(
(OPTI
ON_
D)) I
ndi
rectRecur
sion

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) ef
oll
owi
ngoper
ati
oncannotbeper
for
medonst
ack
wi
thoutr
emov
ingel
ement
sfr
om i
t.
(
(OPTI
ON_
A)) Sor
ti
ng

(
(OPTI
ON_
B)) Pr
int
ing

(
(OPTI
ON_
C)) Tr
aver
sal

(
(OPTI
ON_
D)) Al
labov
e

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) esi
tuat
ionwheni
nal
i
nkedi
mpl
ement
ati
onofst
ack
TOP=NULLi
s..
..
..
..
..
..

(
(OPTI
ON_
A)) Under
fl
ow

(
(OPTI
ON_
B)) Ov
erf
low

(
(OPTI
ON_
C)) Housef
ul

(
(OPTI
ON_
D)) Sat
urat
ed

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) esi
tuat
ionwheni
nal
i
nkedi
mpl
ement
ati
onofst
ack,
whi
l
eaddi
ngnewel
ement
,memor
yal
l
ocat
ionf
ail
ure
occur
sitcanbeconsi
der
edas.
..
..
.

(
(OPTI
ON_
A)) Under
fl
ow

(
(OPTI
ON_
B)) Ov
erf
low

(
(OPTI
ON_
C)) Housef
ul

(
(OPTI
ON_
D)) Sat
urat
ed

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) esi
tuat
ionwheni
nal
i
nkedi
mpl
ement
ati
onofst
ack
ov
erf
lowoccur
s,wecannotper
for
m..
..
..
..
..
..
..

(
(OPTI
ON_
A)) PUSHoper
ati
on

(
(OPTI
ON_
B)) POPoper
ati
on

(
(OPTI
ON_
C)) Bot
hAandB

(
(OPTI
ON_
D)) Noneofabov
e

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

1
(
(MARKS))
(
1/2/
3..
.)

(
(QUESTI ) Th
ON) esi
tuat
ionwheni
nal
i
nkedi
mpl
ement
ati
onofst
ack
ov
erf
lowoccur
s;i
tmaybebecauseof
..
..
..
..
..
..
..

(
(OPTI
ON_
A)) Nospaceav
ail
abl
einst
ack

(
(OPTI
ON_
B)) Memor
yAl
l
ocat
ionFai
l
ure

(
(OPTI
ON_
C)) Bot
hAandB

(
(OPTI
ON_
D)) Noneofabov
e
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) I
nlinkedi
mplementat
ionofstackift
opi
stheonl
ypoi
nterandi
ts
v
alueisNULL,i
tindi
cates.
..
..
..
..
..
..

(
(OPTI
ON_
A)) St
ackUnder
fl
ow

(
(OPTI
ON_
B)) St
ackOv
erf
low

(
(OPTI
ON_
C)) St
acknotCr
eat
ed

(
(OPTI
ON_
D)) AorC

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) Foranempt
ystacki
fweexecut
efol
l
owi
ngoper
ati
onswhatwi
l
lbe
stat
eoft
hestack
POP()
PUSH(
5)
PUSH(
2)
POP()

(
(OPTI
ON_
A)) Under
fl
ow,
TOP=5

(
(OPTI
ON_
B)) Under
fl
ow,
TOP=2
(
(OPTI
ON_
C)) TOP=2

(
(OPTI
ON_
D)) TOP=5

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Fol
ON) lowi
ngi
spr
ecedencef
reef
orm ofexpr
essi
on:

(
(OPTI
ON_
A)) I
nfi
x

(
(OPTI
ON_
B)) Pr
efi
x

(
(OPTI
ON_
C)) Post
fi
x

(
(OPTI
ON_
D)) Bot
hBandC

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) WedonotneedBODMASr
ON) ulef
oreval
uat
ionoft
he
………….
.
(
(OPTI
ON_
A)) I
nfi
xexpr
essi
on

(
(OPTI
ON_
B)) Ful
l
ypar
ent
hesi
zedexpr
essi
on

(
(OPTI
ON_
C)) Pr
efi
xexpr
essi
on

(
(OPTI
ON_
D)) Post
fi
xexpr
essi
on

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Post
fi
xexpr
essi
oni
s………………….
.f
orm ofexpr
essi
on

(
(OPTI
ON_
A)) Par
ent
hesi
sfr
ee

(
(OPTI
ON_
B)) Pr
ecedencef
ree

(
(OPTI
ON_
C)) Sy
ntaxf
ree

(
(OPTI
ON_
D)) Bot
hAandB

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Pr
efi
xexpr
essi
oni
s………………….
.f
orm ofexpr
essi
on

(
(OPTI
ON_
A)) Par
ent
hesi
sfr
ee
(
(OPTI
ON_
B)) Pr
ecedencef
ree

(
(OPTI
ON_
C)) Sy
ntaxf
ree

(
(OPTI
ON_
D)) Bot
hAandB

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Wel
lfor
mednessofpar
ent
hesi
sischeckedusi
ng…………

(
(OPTI
ON_
A)) Li
st

(
(OPTI
ON_
B)) Queue

(
(OPTI
ON_
C)) St
ack

(
(OPTI
ON_
D)) Tr
ee

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) St
ri
ngr
ever
sal
canbedoneusi
ng………………

(
(OPTI
ON_
A)) Li
st

(
(OPTI
ON_
B)) Queue
(
(OPTI
ON_
C)) St
ack

(
(OPTI
ON_
D)) Tr
ee

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Deci
maltobi
nar
ynumberconv
ersi
oni
sdoneusi
ng…………….
dat
a
st
ruct
ure

(
(OPTI
ON_
A)) Li
st

(
(OPTI
ON_
B)) Queue

(
(OPTI
ON_
C)) St
ack

(
(OPTI
ON_
D)) Tr
ee

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Post
fi
xexpr
essi
oni
smer
elyr
ever
seofpr
efi
xexpr
essi
on

(
(OPTI
ON_
A)) Tr
ue

(
(OPTI
ON_
B)) Fal
se
(
(OPTI
ON_
C)) Dependsonexpr
essi
on

(
(OPTI
ON_
D)) Noneofabov
e

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Pr
efi
xexpr
essi
oni
smer
elyr
ever
seofpost
fi
xexpr
essi
on

(
(OPTI
ON_
A)) Tr
ue

(
(OPTI
ON_
B)) Fal
se

(
(OPTI
ON_
C)) Dependsonexpr
essi
on

(
(OPTI
ON_
D)) Noneofabov
e

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Post
fi
xfor
mismor
esui
tabl
efor
………….
.asi
tispr
ecedencef
ree.

(
(OPTI
ON_
A)) Comput
er
(
(OPTI
ON_
B)) Human

(
(OPTI
ON_
C)) Bot
h

(
(OPTI
ON_
D)) Noneofabov
e

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) nar r
ayi mplementat
ionofst
ackTOPi
sgener
all
y
i
nit
ializedto………..

(
(OPTI
ON_
A)) 0

(
(OPTI
ON_
B)) 1

(
(OPTI
ON_
C)) -
1

(
(OPTI
ON_
D)) N

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Ret
ON) urn(
stack[
top]
)mustbei
nst
ruct
ioni
nfol
lowi
ng
funct
ion
(
(OPTI
ON_
A)) PUSH(
Add)

(
(OPTI
ON_
B)) POP(
Remov
e)

(
(OPTI
ON_
C)) TOP(
foraccessi
ngTOPv
alue)

(
(OPTI
ON_
D)) Noneofabov
e

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whatdat
astruct
urewouldyoumostl
yli
kel
yseei
nanonr
ecur
siv
e
i
mplementat
ionofarecur
siv
ealgor
it
hm

(
(OPTI
ON_
A)) Li
nkedl
i
st

(
(OPTI
ON_
B)) Ar
ray

(
(OPTI
ON_
C)) St
ack

(
(OPTI
ON_
D)) Queue

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) Thepost
fi
xfor
m ofA*
B+C/
Dis.
..
..
..
..
..
..
..
..
..
..
..
..
..
.

(
(OPTI
ON_
A)) *
AB/
CD+
(
(OPTI
ON_
B)) AB*
CD/
+

(
(OPTI
ON_
C)) A*
BC+/
D

(
(OPTI
ON_
D)) ABCD+/
*

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Thepr
ON) efi
xfor
m ofA-
B/(
C*D⋀E)i
s

(
(OPTI
ON_
A)) -
/*⋀ACBDE

(
(OPTI
ON_
B)) -
ABCD*
⋀DE

(
(OPTI
ON_
C)) -
A/B*
C⋀DE

(
(OPTI
ON_
D)) -
A/BC*
⋀DE

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whatistheresul
toft
hef
oll
owi
ngoper
ati
on
Top(Push(S,X))

(
(OPTI
ON_
A)) X

(
(OPTI
ON_
B)) NULL
(
(OPTI
ON_
C)) S

(
(OPTI
ON_
D)) None

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) Thepr
efi
xfor
m ofani
nfi
xexpr
essi
onp+q-r*t

(
(OPTI
ON_
A)) +pq-*
rt

(
(OPTI
ON_
B)) -+pqr*t

(
(OPTI
ON_
C)) -+pq*r
t

(
(OPTI
ON_
D)) -+*pqr
t

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Ther
ON) esul
tofev
aluat
ingt
hepost
fi
xexpr
essi
on5,
4,6,
+,*
,4,
9,
3,/
,+,*is

(
(OPTI
ON_
A)) 600

(
(OPTI
ON_
B)) 350

(
(OPTI
ON_
C)) 650

(
(OPTI
ON_
D)) 588
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) Conver
tt hef
oll
owinginfi
xexpressi
onsi
ntoi
ts
equi
valentpost
fixexpr
essions
(
A+B⋀D)/(
E-F) +G
(
(OPTI
ON_
A)) (
ABD⋀+EF- /G+)

(
(OPTI
ON_
B)) (
ABD+⋀EF-/G+)

(
(OPTI
ON_
C)) (
ABD⋀+EF/
-G+)

(
(OPTI
ON_
D)) None

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) Conv
ertt
hef
oll
owi
ngI
nfi
xexpr
essi
ont
oPost
fi
xfor
m usi
ngast
ack

x+y*z+(p*q+r )*s,Fol
lowusual
precedencer
uleandassume
t
hatt
heexpr
essi
onislegal
.

(
(OPTI
ON_
A)) xy
z*+pq*
r+s*
+

(
(OPTI
ON_
B)) xy
z*+pq*
r+s+*

(
(OPTI
ON_
C)) xy
z+*
pq*
r+s*
+

(
(OPTI
ON_
D)) A
(
(CORRECT_
C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whichoft
hefol
lowingst
atement
(s)aboutst
ackdat
ast
ruct
ure
i
s/areNOTcorr
ect?

(
(OPTI
ON_
A)) St
ackdat
ast
ruct
urecanbei
mpl
ement
edusi
ngl
i
nkedl
i
st

(
(OPTI
ON_
B)) Newnodecanonl
ybeaddedatt
het
opoft
hest
ack

(
(OPTI
ON_
C)) St
acki
stheFI
FOdat
ast
ruct
ure

(
(OPTI
ON_
D)) Thel
astnodeatt
hebot
tom oft
hest
ackhasaNULLl
i
nk

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Consi
dert
heli
nkedl
istimpl
ement
ati
onofastack.Whi
choft
he
fol
l
owingnodei
sconsider
edasTopoft
hestack?

(
(OPTI
ON_
A)) Fi
rstnode

(
(OPTI
ON_
B)) Lastnode

(
(OPTI
ON_
C)) Anynode

(
(OPTI
ON_
D)) Mi
ddl
enode

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) Consi
derthefol
lowingoperat
ionperf
ormedonast ackofsi
ze5.
Push(
1);Pop();Push(2);Push(3)
;Pop()
;Push(4);
Pop()
;Pop(); Push(5)
;Aft
erthecompleti
onofall
operati
on,t
heno
ofel
ementpresentonstackare

(
(OPTI
ON_
A)) 1

(
(OPTI
ON_
B)) 2

(
(OPTI
ON_
C)) 3

(
(OPTI
ON_
D)) 4

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

1
(
(MARKS))
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whi
choft
hef
oll
owi
ngi
snotani
nher
entappl
i
cat
ionofst
ack?

(
(OPTI
ON_
A)) Rev
ersi
ngast
ri
ng

(
(OPTI
ON_
B)) Ev
aluat
ionofpost
fi
xexpr
essi
on

(
(OPTI
ON_
C)) I
mpl
ement
ati
onofr
ecur
sion

(
(OPTI
ON_
D)) Jobschedul
i
ng

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whichoft
hefol
l
owingoperat
iont
akewor
stcasel
i
neart
imei
nthe
ar
rayimpl
ement
ati
onofstack?

(
(OPTI
ON_
A)) Push

(
(OPTI
ON_
B)) Pop

(
(OPTI
ON_
C)) I
sEmpt
y

(
(OPTI
ON_
D)) None

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Thet
ypeofexpr
essi
oni
nwhi
choper
atorsucceedsi
tsoper
andsi
s

(
(OPTI
ON_
A)) I
nfi
xExpr
essi
on

(
(OPTI
ON_
B)) pr
efi
xExpr
essi
on

(
(OPTI
ON_
C)) post
fi
xExpr
essi
on

(
(OPTI
ON_
D)) None

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)
) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whi
choft
hef
oll
owi
ngappl
i
cat
iongener
all
yuseast
ack?

(
(OPTI
ON_
A)) Par
ent
hesi
sbal
anci
ngpr
ogr
am

(
(OPTI
ON_
B)) Sy
ntaxanal
yzeri
ncompi
l
er

(
(OPTI
ON_
C)) Keepi
ngt
rackofl
ocal
var
iabl
esatr
unt
ime

(
(OPTI
ON_
D)) Al
loft
heabov
e

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) Consi
dert
hef
oll
owi
ngar
rayi
mpl
ement
ati
onofst
ack:
#defi
neMAX10
Str
uctSTACK
{
I
ntarr[MAX]
;
I
nttop=-1;
}

I
fthearr
ayindexst
art
swith0,t
hemaxi
mum v
alueoft
opwhi
ch
doesnotcausest
ackover
flowi
s?

(
(OPTI
ON_
A)) 8

(
(OPTI
ON_
B)) 9

(
(OPTI
ON_
C)) 10

(
(OPTI
ON_
D)) 11

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whati
sthemini
mum numberofst
acksofsi
zenr
equi
redt
o
i
mplementaqueueofsi
zen?

(
(OPTI
ON_
A)) 1

(
(OPTI
ON_
B)) 2

(
(OPTI
ON_
C)) 3

(
(OPTI
ON_
D)) 4

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Assumet
ON) hattheoperat
ors+,-
,Xarelef
tassoci
ati
veand⋀i s
ri
ghtassociat
ive.Theorderofpr
ecedence(f
rom hi
ghestt
o
l
owest
)is⋀,
X,+,
-.Thepost
fi
xexpr
essi
oncor
respondi
ngt
othe
i
nfi
xexpr
essi
ona+bXc–d⋀e⋀fi
s

(
(OPTI
ON_
A)) abcX+def⋀⋀-

(
(OPTI
ON_
B)) abcX+de⋀f
⋀-

(
(OPTI
ON_
C)) ab+cXd–e⋀f

(
(OPTI
ON_
D)) -
+aXbc⋀⋀def

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) I
ftheelement
s“A”,“
B”,“C”and“
D”areplacedi
nastackandar
e
del
etedoneatati
me, i
nwhatorderwi
ll
theyberemoved?

(
(OPTI
ON_
A)) ABCD

(
(OPTI
ON_
B)) DCBA

(
(OPTI
ON_
C)) DCAB

(
(OPTI
ON_
D)) ABDC

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O B
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) Considert
heusual i
mplementati
onofparent
hesesbal
ancing
progr
am usingstack.Whati
st hemaximum numberofparent
heses
thatwil
lappearonstackatanyinst
anceofti
meduringtheanaly
sis
of(()(())(())) ?

(
(OPTI
ON_
A)) 1

(
(OPTI
ON_
B)) 2

(
(OPTI
ON_
C)) 3

(
(OPTI
ON_
D)) 4

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Post
ON) fixf
orm ofexpr
essi
on(
a+(
b*(
c/d)
-e)
)is………

(
(OPTI
ON_
A)) abcd*
/+e-

(
(OPTI
ON_
B)) abc*
d/+e-

(
(OPTI
ON_
C)) a*
bcd/
e-+

(
(OPTI
ON_
D)) abcd/
*e-
+

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Whi
ON) choft
hefoll
owi ngi
sessenti
alforconvert
ingt
he
i
nfi
xexpressi
ont opostf
ixf
orm eff
ici
ently?

(
(OPTI
ON_
A)) Oper
atorSt
ack

(
(OPTI
ON_
B)) Oper
andSt
ack

(
(OPTI
ON_
C)) Bot
hAandB

(
(OPTI
ON_
D)) Par
seTr
ee

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)
) 1
(
1/2/
3..
.)

(
(QUESTI ) St
ON) ackcanbeusef
ulf
ori
mpl
ement
ing…….

(
(OPTI
ON_
A)) Radi
xsor
t

(
(OPTI
ON_
B)) Br
eadt
hFi
rstSear
ch

(
(OPTI
ON_
C)) Recur
sion

(
(OPTI
ON_
D)) Noneofabov
e

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Whendat
ait
em i
spushedont
hest
ackt
henon–t
opel
ementoft
he
st
acki
s…….

(
(OPTI
ON_
A)) Mov
edupwar
ds

(
(OPTI
ON_
B)) Mov
eddownwar
ds

(
(OPTI
ON_
C)) Remai
nsatsamel
ocat
ion

(
(OPTI
ON_
D)) Noneofabov
e

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Post
ON) fi
xexpr
essi
oneval
uat
ionoper
ati
oni
s
perf
ormed………..

(
(OPTI
ON_
A)) Accor
dingt
opr
esetconv
ent
ion
(
(OPTI
ON_
B)) Fr
om l
eftt
ori
ght

(
(OPTI
ON_
C)) Asperpar
ent
hesi
s

(
(OPTI
ON_
D)) Ri
ghtt
olef
t

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Theempt
ON) ycondi
tioni
nar
rayi
mpl
ement
ati
onofst
ack
ischeckedby……………

(
(OPTI
ON_
A)) Top==-
1

(
(OPTI
ON_
B)) Top==0

(
(OPTI
ON_
C)) Fr
ont
==r
ear

(
(OPTI
ON_
D)) Fr
ont
<rear

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) fther
eisonl
yoneel
ementi
nst
ackt
hent
heval
ueof
t
opis……….
.

(
(OPTI
ON_
A)) 1

(
(OPTI
ON_
B)) 2

(
(OPTI
ON_
C)) -
1

(
(OPTI
ON_
D)) 0

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) I
ON) fMAXisthearraysi
zefori
mplementi
ngst
ack,t
hen
stackf
ullcondi
tioni
scheckedby…………

(
(OPTI
ON_
A)) Top>=MAX

(
(OPTI
ON_
B)) Top<Max

(
(OPTI
ON_
C)) Rear
==MAX

(
(OPTI
ON_
D)) Rear
<Max

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ther
ON) esultofat
tempttoremoveanel
ementf
rom
emptyst
ackiscal
led…………..

(
(OPTI
ON_
A)) St
ackov
erf
low

(
(OPTI
ON_
B)) St
ackunder
fl
ow

(
(OPTI
ON_
C)) St
ackexcept
ion

(
(OPTI
ON_
D)) Noneofabov
e

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Ther
ON) esultofat
temptt
oaddanel
ementt
oful
lst
ack
iscal
led…………..

(
(OPTI
ON_
A)) St
ackov
erf
low

(
(OPTI
ON_
B)) St
ackunder
fl
ow

(
(OPTI
ON_
C)) St
ackexcept
ion

(
(OPTI
ON_
D)) Noneofabov
e

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Thet
ON) imecompl
exi
tyofpost
fixexpr
essi
oneval
uat
ion
is……

(
(OPTI
ON_
A)) O(
n)

(
(OPTI
ON_
B)) O(
nlogn)

(
(OPTI
ON_
C)) O(
1)

(
(OPTI
ON_
D)) O(
logn)

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Thet
ON) imecompl
exi
tyofpopoper
ati
oni
s……

(
(OPTI
ON_
A)) O(
n)

(
(OPTI
ON_
B)) O(
nlogn)

(
(OPTI
ON_
C)) O(
1)

(
(OPTI
ON_
D)) O(
logn)

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Thet
ON) imecompl
exi
tyofPushoper
ati
oni
s……

(
(OPTI
ON_
A)) O(
n)

(
(OPTI
ON_
B)) O(
nlogn)

(
(OPTI
ON_
C)) O(
1)

(
(OPTI
ON_
D)) O(
logn)

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Thet
ON) imecompl
exi
tyofvi
ew_t
opoper
ati
oni
s……

(
(OPTI
ON_
A)) O(
n)

(
(OPTI
ON_
B)) O(
nlogn)

(
(OPTI
ON_
C)) O(
1)

(
(OPTI
ON_
D)) O(
logn)

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Whati
ON) sout
putoff
oll
owi
ngcode

Voi
dmai
n()

I
ntf
un(
int
,int
,int
)

Pr
int
f(“
%d”,
fun(
3,2,
6))
;

I
ntf
un(
intn,
inta,
intm)

I
f(n==1)Ret
urna;

El
ser
etur
nm+f
un(
n-1,
a,m)
;
}

(
(OPTI
ON_
A)) 20

(
(OPTI
ON_
B)) 14

(
(OPTI
ON_
C)) 10

(
(OPTI
ON_
D)) 8

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) The8queenspr
ON) obl
em canbesol
vedusi
ng….
.

(
(OPTI
ON_
A)) Di
vi
deandconquer

(
(OPTI
ON_
B)) Gr
eedyMet
hod

(
(OPTI
ON_
C)) Backt
racki
ng

(
(OPTI
ON_
D)) Noneofabov
e

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Post
ON) fixf
orm ofexpr
essi
onA+B+C+Di
s………

(
(OPTI
ON_
A)) AB+C+D+

(
(OPTI
ON_
B)) ABCD+++

(
(OPTI
ON_
C)) ABC++D+

(
(OPTI
ON_
D)) AB++CD+

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Pr
ON) efi
xfor
m ofexpr
essi
onA+B+C+Di
s………

(
(OPTI
ON_
A)) +++ABCD

(
(OPTI
ON_
B)) ABCD+++

(
(OPTI
ON_
C)) ABC++D+

(
(OPTI
ON_
D)) AB++CD+

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Post
ON) fixf
orm ofexpr
essi
onA*B*C*Di
s………

(
(OPTI
ON_
A)) AB*
C*D*

(
(OPTI
ON_
B)) ABCD*
**

(
(OPTI
ON_
C)) ABC*
*D*

(
(OPTI
ON_
D)) AB*
*CD*

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Pr
ON) efi
xfor
m ofexpr
essi
onA*B*C*Di
s………

(
(OPTI
ON_
A)) *
**ABCD

(
(OPTI
ON_
B)) *
*AB*
CD

(
(OPTI
ON_
C)) A*
*BC*
D

(
(OPTI
ON_
D)) AB*
*CD*

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) I
nfi
xfor
m ofex
pressi
on………AB+C+D+i
s……….

(
(OPTI
ON_
A)) A+B+C+D

(
(OPTI
ON_
B)) A+(
B+C)
+D

(
(OPTI
ON_
C)) (
A+B)
+(C+D)

(
(OPTI
ON_
D)) A+B+(
C+D)

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Expr
ON) essi
on+++ABCDi
sinf
ixf
orm of………….
.

(
(OPTI
ON_
A)) A+B+C+D

(
(OPTI
ON_
B)) (
A+B)
+(C+D)

(
(OPTI
ON_
C)) (
A+B)
+C+D

(
(OPTI
ON_
D)) A&C

(
(CORRECT_
C D
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Post
ON) fixf
orm ofexpr
essi
on(
A+B)
+(C+D)i
s

(
(OPTI
ON_
A)) AB+CD++

(
(OPTI
ON_
B)) ABCD+++

(
(OPTI
ON_
C)) ABC++D+

(
(OPTI
ON_
D)) AB++CD+

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Pr
ON) efi
xfor
m ofexpr
essi
on(
A+B)
+(C+D)i
s……….
.

(
(OPTI
ON_
A)) ++AB+CD

(
(OPTI
ON_
B)) +++ABCD

(
(OPTI
ON_
C)) ++ABC+D

(
(OPTI
ON_
D)) AB++CD+

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Pr
ON) efi
xfor
m ofAB+CD++i
s

(
(OPTI
ON_
A)) ++AB+CD

(
(OPTI
ON_
B)) +++ABCD

(
(OPTI
ON_
C)) ++ABC+D

(
(OPTI
ON_
D)) AB++CD+

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Post
ON) fixf
orm ofexpr
essi
onA+B+(
C+D)i
s……….
.

(
(OPTI
ON_
A)) AB+CD++

(
(OPTI
ON_
B)) AB+C+D+

(
(OPTI
ON_
C)) ABCD+++

(
(OPTI
ON_
D)) None

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Pr
ON) efi
xfor
m ofexpr
essi
onA+B+(
C+D)i
s……….
.

(
(OPTI
ON_
A)) ++AB+CD

(
(OPTI
ON_
B)) +++ABCD

(
(OPTI
ON_
C)) +AB++CD

(
(OPTI
ON_
D)) None

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Pr
ON) efi
xfor
m ofexpr
essi
onAB+CD++wi
llbe
(
(OPTI
ON_
A)) ++AB+CD

(
(OPTI
ON_
B)) +++ABCD

(
(OPTI
ON_
C)) +AB++CD

(
(OPTI
ON_
D)) None

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Post
ON) fixf
orm ofexpr
essi
on++AB+CDwi
llbe

(
(OPTI
ON_
A)) AB+CD++

(
(OPTI
ON_
B)) AB+C+D+

(
(OPTI
ON_
C)) ABCD+++

(
(OPTI
ON_
D)) None

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Post
ON) fixf
orm ofexpr
essi
onA+B*C-
Dis………

(
(OPTI
ON_
A)) AB+C*
D-

(
(OPTI
ON_
B)) ABC*
+D-

(
(OPTI
ON_
C)) AB+C*
D-

(
(OPTI
ON_
D)) AB*
CD+-

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Pr
ON) efi
xfor
m ofexpr
essi
onA+B*C-
Dis………

(
(OPTI
ON_
A)) +-A*
BCD

(
(OPTI
ON_
B)) -
+A*
BCD

(
(OPTI
ON_
C)) +A*
B-CD

(
(OPTI
ON_
D)) -
+*ABCD

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Post
ON) fixf
orm ofexpr
essi
on(
A+B)
*C-
Dis………

(
(OPTI
ON_
A)) ABC+*
D-

(
(OPTI
ON_
B)) AB+C*
D-

(
(OPTI
ON_
C)) ABC*
+D-

(
(OPTI
ON_
D)) ABCD*
+-

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Post
ON) fixf
orm ofexpr
essi
on(
A+B)
*(C-
D)i
s………

(
(OPTI
ON_
A)) AB+CD-
*

(
(OPTI
ON_
B)) AB+CD-
*

(
(OPTI
ON_
C)) AB+CD*
-

(
(OPTI
ON_
D)) AB+C*
D-

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Post
ON) fixf
orm ofexpr
essi
onA*B/C-
Dis………

(
(OPTI
ON_
A)) ABC/
*D-

(
(OPTI
ON_
B)) AB*
C/D-

(
(OPTI
ON_
C)) ABC*
/D-

(
(OPTI
ON_
D)) ABCD*
/-

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Post
ON) fixf
orm ofexpr
essi
onA*(
B/C)
-Di
s………

(
(OPTI
ON_
A)) ABC*
/D-

(
(OPTI
ON_
B)) ABC/
*D-

(
(OPTI
ON_
C)) ABC/
D*-

(
(OPTI
ON_
D)) ABC*
D/-

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Post
ON) fixf
orm ofexpr
essi
onA*B-
C/Di
s………
(
(OPTI
ON_
A)) ABCD*
/-

(
(OPTI
ON_
B)) AB*
CD/
-

(
(OPTI
ON_
C)) AB-
*CD/

(
(OPTI
ON_
D)) ABCD*
-/

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Post
ON) fixf
orm ofexpr
essi
onA+B-
C*D^Ei
s………

(
(OPTI
ON_
A)) AB+C*
DE-
^

(
(OPTI
ON_
B)) AB+CDE^
*-

(
(OPTI
ON_
C)) ABC*
+DE^
-

(
(OPTI
ON_
D)) AB+CD*
E^-

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Post
ON) fixf
orm ofexpr
essi
onA+(
B-C)
*D/Ei
s………

(
(OPTI
ON_
A)) ABC+-
D*E/

(
(OPTI
ON_
B)) ABC-
D*E/
+
(
(OPTI
ON_
C)) ABC-
+DE*
/

(
(OPTI
ON_
D)) ABC+-
DE*
/

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Post
ON) fixf
orm ofexpr
essi
on(
A+(
B-C)
)*D/Ei
s………

(
(OPTI
ON_
A)) ABC+-
D*E/

(
(OPTI
ON_
B)) ABC-
+D*
E/

(
(OPTI
ON_
C)) ABC-
+DE/
*

(
(OPTI
ON_
D)) ABC-
+DE*
/

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Post
ON) fixf
orm ofexpr
essi
on(
A+B-
C)*D^Ei
s………

(
(OPTI
ON_
A)) ABC+-
DE^
*

(
(OPTI
ON_
B)) AB+C-
DE^
*

(
(OPTI
ON_
C)) AB+C-
DE*
^

(
(OPTI
ON_
D)) ABC+-
DE^
*
(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Pr
ON) efi
xfor
m ofexpr
essi
on(
A+B)
*C-
Dis………

(
(OPTI
ON_
A)) *
-+ABCD

(
(OPTI
ON_
B)) -
*+ABCD

(
(OPTI
ON_
C)) -
+*ABCD

(
(OPTI
ON_
D)) *
+AB-
CD

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Pr
ON) efi
xfor
m ofexpr
essi
on(
A+B)
*(C-
D)i
s………

(
(OPTI
ON_
A)) +*
AB-
CD

(
(OPTI
ON_
B)) *
+AB-
CD

(
(OPTI
ON_
C)) *
+-ABCD

(
(OPTI
ON_
D)) +AB*
-CD

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)
(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Pr
ON) efi
xfor
m ofexpr
essi
onA*B/C-
Dis………

(
(OPTI
ON_
A)) /
-*ABCD

(
(OPTI
ON_
B)) -
/*ABCD

(
(OPTI
ON_
C)) -
*/ABCD

(
(OPTI
ON_
D)) /
*AB-
CD

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Pr
ON) efi
xfor
m ofexpr
essi
onA*(
B/C)
-Di
s………

(
(OPTI
ON_
A)) *
-A/
BCD

(
(OPTI
ON_
B)) -
*A/
BCD

(
(OPTI
ON_
C)) -
*/ABCD

(
(OPTI
ON_
D)) *
A/B-
CD

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Pr
ON) efi
xfor
m ofexpr
essi
onA*B-
C/Di
s………

(
(OPTI
ON_
A)) *
-AB/
CD

(
(OPTI
ON_
B)) -
*AB/
CD

(
(OPTI
ON_
C)) -
*/ABCD

(
(OPTI
ON_
D)) -
/*ABCD

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Pr
ON) efi
xfor
m ofexpr
essi
onA+B-
C*D^Ei
s………

(
(OPTI
ON_
A)) +A-
B*CD^
DE

(
(OPTI
ON_
B)) -
+AB*
CD^
DE

(
(OPTI
ON_
C)) +-
AB*
CD^
DE

(
(OPTI
ON_
D)) -
+*ABCD^
DE

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Pr
ON) efi
xfor
m ofexpr
essi
onA+(
B-C)
*D/Ei
s………

(
(OPTI
ON_
A)) +A*
/-BCDE

(
(OPTI
ON_
B)) +A/
*-BCDE

(
(OPTI
ON_
C)) +A/
-BC*
DE

(
(OPTI
ON_
D)) +A*
-BC/
DE

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Pr
ON) efi
xfor
m ofexpr
essi
on(
A+(
B-C)
)*D/Ei
s………

(
(OPTI
ON_
A)) *
/+A-
BCDE

(
(OPTI
ON_
B)) /
*+A-
BCDE

(
(OPTI
ON_
C)) -
+/*
ABCDE

(
(OPTI
ON_
D)) None

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI ) Pr
ON) efi
xfor
m ofexpr
essi
on(
A+B-
C)*D^Ei
s………

(
(OPTI
ON_
A)) -
+*^
ABCDE

(
(OPTI
ON_
B)) *
-+ABC^
DE

(
(OPTI
ON_
C)) +_
*^ABCDE

(
(OPTI
ON_
D)) -
*+ABC^
DE

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) ……….
.dat
ast
ruct
urei
susedi
neval
uat
ionof
Post
fixexpr
essi
on

(
(OPTI
ON_
A))
Tr
ee

(
(OPTI
ON_
B))
St
ack

(
(OPTI
ON_
C))
Queue

(
(OPTI
ON_
D)) Gr
aph

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) ……….
.dat
ast
ruct
urei
susedi
neval
uat
ionof
pr
efi
xexpr
essi
on
(
(OPTI
ON_
A))
Tr
ee

(
(OPTI
ON_
B))
St
ack

(
(OPTI
ON_
C))
Queue

(
(OPTI
ON_
D)) Gr
aph

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Thecor
ON) rectPUSH oper
ati
oni
s………

(
(OPTI
ON_
A)) Dat
a[++t
op]
=val
ue

(
(OPTI
ON_
B)) Dat
a[t
op]
=val
ue

(
(OPTI
ON_
C)) Dat
a[t
op++]
=val
ue

(
(OPTI
ON_
D)) Dat
a[-
-t
op]
=val
ue

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) Thecor
ON) rectPOPoper
ati
oni
s………

(
(OPTI
ON_
A)) Ret
urn(
Dat
a[++t
op]
)

(
(OPTI
ON_
B)) Ret
urn(
Dat
a[t
op-
-]
)

(
(OPTI
ON_
C)) Ret
urn(
Dat
a[t
op++]
)

(
(OPTI
ON_
D)) Ret
urn(
Dat
a[-
-t
op]
)

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
)
Ev
aluat
efol
l
owi
ngpost
fi
xexpr
essi
on:

ABC+*
DE\
-wher
eA=5,
B=6,
C=2,
D=12,
E=4

(
(OPTI
ON_
A))
25

(
(OPTI
ON_
B))
36

(
(OPTI
ON_
C))
37

(
(OPTI
ON_
D))
34

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTI
ONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
)
Ev
aluat
efol
l
owi
ngpost
fi
xexpr
essi
on:

562+*124/-
(
(OPTI
ON_
A)) 25

(
(OPTI
ON_
B)) 36

(
(OPTI
ON_
C)) 37

(
(OPTI
ON_
D)) 34
(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
)
Ev
aluat
efol
l
owi
ngpost
fi
xexpr
essi
on:

623+-
382/
+*2$3+

(
(OPTI
ON_
A)) 52

(
(OPTI
ON_
B)5
)0 50

(
(OPTI
ON_
C)) 32

(
(OPTI
ON_
D)) 38

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 2
(
1/2/
3..
.)

(
(QUESTI
ON)
) Twost
acki
mpl
ement
ati
oni
nsi
ngl
ear
rayshoul
d

St
acksgr
owi
ngi
n…………
(
(OPTI
ON_
A)) For
war
ddi
rect
ion

(
(OPTI
ON_
B)) Backwar
dDi
rect
ion

(
(OPTI
ON_
C)) Opposi
teDi
rect
ions

(
(OPTI
ON_
D)) Noneofabov
e

(
(CORRECT_
C C
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Pol
ishnot
ati
oni
sal
socal
led……….

(
(OPTI
ON_
A)) Pr
efi
x

(
(OPTI
ON_
B)) Post
fi
x

(
(OPTI
ON_
C)) I
nfi
x

(
(OPTI
ON_
D)) Noneofabov
e

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI
ON)
) Rever
sePol
ishnot
ati
oni
sal
socal
led……….

(
(OPTI
ON_
A)) Pr
efi
x

(
(OPTI
ON_
B)) Post
fi
x

(
(OPTI
ON_
C)) I
nfi
x

(
(OPTI
ON_
D)) Noneofabov
e

(
(CORRECT_
C B
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)

(
(MARKS)) 1
(
1/2/
3..
.)

(
(QUESTI ) ………………dat
ON) ast
ruct
urei
susef
uli
nUNDOoper
ati
on
ofWindows
(
(OPTI
ON_ ) St
A) ack

(
(OPTI
ON_
B)) Queue

(
(OPTI
ON_
C)) Ar
ray

(
(OPTI
ON_
D)) None

(
(CORRECT_
C A
HOI
CE))
(
A/B/C/
D)

(
(EXPLANATI
O
N))
(
OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION From a group of 7 men and 6 women, five persons are to be
)) selected to form a committee so that at least 3 men are
there on the committee. In how many ways can it be done?
((OPTION_A) 564
)
((OPTION_B) 645
)
((OPTION_C) 735
)
((OPTION_D) 756
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
We may have (3 men and 2 women) or (4 men and 1 woman) or (5 men
((EXPLANAT only).
ION))
.. 7 6 7 6 7
(OPTIONAL) Required number of ways= ( C3 x C2) + ( C4 x C1) + ( C5)
7x6x5 6x5
= x + (7C3 x 6C1) + (7C2)
( (
3x2x1 2x1
= 525 +
7x6x5
3x2x1
) )[ J
x6 +
7x6
2x1
= (525 + 210 + 21)
= 756.
((MARKS)) 1
(1/2/3...)
((QUESTION)) How many 2 digits numbers can be formed from
the digits 0, 1, 2, 3, 4, 5 ?
((OPTION_A)) 5 x 6
((OPTION_B)) 52
((OPTION_C)) 62
((OPTION_D)) 50
((CORRECT_C A
HOICE))
(A/B/C/D)
((EXPLANATI To form two digit number, the first digit must be non-zero
ON)) and second may be any digit.
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION)) In how many ways 4 boys and 3 girls can be seated in
a row so that they are alternate.
((OPTION_A)) 144
((OPTION_B)) 288
((OPTION_C)) 12
((OPTION_D)) 256
((CORRECT_C A
HOICE))
(A/B/C/D)
((EXPLANATI Let the Arrangement be,
ON)) BGBGBGB
(OPTIONAL)
4 boys can be seated in 4! Ways.
Girl can be seated in 3! Ways.
Required number of ways,
= 4!*3! = 144.
((MARKS)) 2
(1/2/3...)
((QUESTION)) There are 30 people in a party. If everyone is to shake
hands with one another, how many hand shakes are
possible?
((OPTION_A)) 180
((OPTION_B)) 256
((OPTION_C)) 386
((OPTION_D)) 435
((CORRECT_C D
HOICE))
(A/B/C/D)
((EXPLANATI Total number of persons = n = 30
ON)) Shake hands involve only 2 persons = r = 2
(OPTIONAL) Number of shake hands = nCr = 30C2
30
C2 = (30 * 29) /(2 * 1) = 435
n
Cr = (n!) / r! (n – r)!
= 30! / 2! 28!
= 435
((MARKS)) 1
(1/2/3...)
((QUESTION)) A man positioned at the origin of the coordinate system.
The man can take steps of unit measure in the direction
North, East, West or South. Find the number of ways of
he can reach the point (5,6), covering the shortest
possible distance.
((OPTION_A)) 252
((OPTION_B)) 432
((OPTION_C)) 462
((OPTION_D)) 504
((CORRECT_C C
HOICE))
(A/B/C/D)
((EXPLANATI In order to reach (5,6) covering the shortest distance at the
ON)) same time the man has to make 5 horizontal and 6 vertical
(OPTIONAL) steps.
The number of ways in which these steps can be taken is
given by:
11! /(5! *6!) = 462
((MARKS)) 2
(1/2/3...)
((QUESTION)) a,b,c,d and e are five natural numbers. Find the number
of ordered sets (a,b,c,d,e) possible such that :
a + b + c + d + e =64
((OPTION_A)) 64
C5
((OPTION_B)) 68
C4
((OPTION_C)) 65
C4
((OPTION_D)) 63
C5
((CORRECT_C B
HOICE))
(A/B/C/D)
((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION In how many different ways can the letters of the
)) word 'LEADING' be arranged in such a way that the
vowels always come together?
((OPTION_A) 360
)
((OPTION_B) 480
)
((OPTION_C) 720
)
((OPTION_D) 5040
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
The word 'LEADING' has 7 different letters.
((EXPLANAT
ION)) When the vowels EAI are always together, they can be supposed to form one
(OPTIONAL) letter.
Then, we have to arrange the letters LNDG (EAI).

Now, 5 (4 + 1 = 5) letters can be arranged in 5! = 120 ways.

The vowels (EAI) can be arranged among themselves in 3! = 6 ways.

Required number of ways = (120 x 6) = 720.


((MARKS)) 1
(1/2/3...)
((QUESTION)) How many 6 digit telephone numbers can be formed if
each number starts with 35 and no digit appears more
than once?
((OPTION_A)) 720
((OPTION_B)) 360
((OPTION_C)) 1420
((OPTION_D)) 1680
((CORRECT_C D
HOICE))
(A/B/C/D)
((EXPLANATI The first two places can only be filled by 3 and 5
ON)) respectively and there is only 1 way for doing this.
(OPTIONAL) Given that no digit appears more than once. Hence we
have 8 digits remaining (0,1,2,4,6,7,8,9)
So, the next 4 places can be filled with the remaining 8
digits in 8P4 ways.
Total number of ways = 8P4 =8×7×6×5=1680
((MARKS)) 2
(1/2/3...)
((QUESTION In how many different ways can the letters of the word
)) 'CORPORATION' be arranged so that the vowels always
come together?
((OPTION_A) 810
)
((OPTION_B) 1440
)
((OPTION_C) 2880
)
((OPTION_D) 50400
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
In the word 'CORPORATION', we treat the vowels OOAIO as one letter.
((EXPLANAT
ION)) Thus, we have CRPRTN (OOAIO).
(OPTIONAL)
This has 7 (6 + 1) letters of which R occurs 2 times and the rest are different.

7!
Number of ways arranging these letters = = 2520.
2!

Now, 5 vowels in which O occurs 3 times and the rest are different, can be
arranged

5!
in = 20 ways.
3!

Required number of ways = (2520 x 20) = 50400.


((MARKS)) 1
(1/2/3...)
((QUESTION)) 25 buses are running between two places P and Q.
In how many ways can a person go from P to Q and
return by a different bus?
((OPTION_A)) None of these
((OPTION_B)) 600
((OPTION_C)) 576
((OPTION_D)) 625
((CORRECT_C B
HOICE))
(A/B/C/D)
((EXPLANATI He can go in any of the 25 buses (25 ways).
ON))
(OPTIONAL)
Since he cannot come back in the same bus, he can return
in 24 ways.

Total number of ways =25×24=600


((MARKS)) 2
(1/2/3...)
A question paper consists of 10 questions divided into two parts A and B.
((QUESTION)) Each part contains five questions. A candidate is required to attempt six
questions in all of which at least 2 should be from part A and at least 2
from part B. In how many ways can the candidate select the questions if
he can answer all questions equally well?
((OPTION_A)) 500
((OPTION_B)) 100
((OPTION_C)) 150
((OPTION_D)) 200
((CORRECT_C D
HOICE))
(A/B/C/D)
((EXPLANATI The candidate has to select six questions in all of which at least two
should be from Part A and two should be from Part B. He can select
ON))
questions in any of the following ways:
(OPTIONAL)
Choice Part A Part B
(i) 2 4
(ii) 3 3
(iii) 4 2

If the candidate follows choice (i), the number of ways in


which he can do so is:
5
C2×5C4=10×5=50
If the candidate follows choice (ii), the number of ways in
which he can do so is:
5
C3×5C3=10×10=100
Similarly, if the candidate follows choice (iii), then the
number of ways in which he can do so is:
5
C4×5C2=5×10=50
Therefore, the candidate can select the question in
50+100+50 = 200 ways.
((MARKS)) 2
(1/2/3...)
((QUESTION Out of 7 consonants and 4 vowels, how many words of 3
)) consonants and 2 vowels can be formed?
((OPTION_A) 210
)
((OPTION_B) 1050
)
((OPTION_C) 25200
)
((OPTION_D) 21400
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
Number of ways of selecting (3 consonants out of 7) and (2 vowels out of 4)
((EXPLANAT
ION)) = (7C3 x 4C2)
(OPTIONAL) 7x6x5 4x3
=( x
3x2x1 2x1 J
= 210.

Number of groups, each having 3 consonants and 2 vowels = 210.

Each group contains 5 letters.

Number of ways of arranging


= 5!
5 letters among themselves
=5x4x3x2x1
= 120.

.. Required number of ways = (210 x 120) = 25200.


((MARKS)) 1
(1/2/3...)
((QUESTION In how many ways can the letters of the word
)) 'LEADER' be arranged?
((OPTION_A) 720
)
((OPTION_B) 360
)
((OPTION_C) 144
)
((OPTION_D) 72
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
The word 'LEADER' contains 6 letters, namely 1L, 2E, 1A, 1D and 1R.
((EXPLANAT
ION)) Required number of ways =
6!
= 360.
(OPTIONAL) (1!)(2!)(1!)(1!)(1!)
((MARKS)) 1
(1/2/3...)
((QUESTION How many 3-digit numbers can be formed from the digits
)) 2, 3, 5, 6, 7 and 9, which are divisible by 5 and
none of the digits is repeated?
((OPTION_A) 5
)
((OPTION_B) 10
)
((OPTION_C) 15
)
((OPTION_D) 20
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
Since each desired number is divisible by 5, so we must have 5 at the unit
((EXPLANAT place. So, there is 1 way of doing it.
ION))
(OPTIONAL) The tens place can now be filled by any of the remaining 5 digits (2, 3, 6, 7,
9). So, there are 5 ways of filling the tens place.

The hundreds place can now be filled by any of the remaining 4 digits. So,
there are 4 ways of filling it.

Required number of numbers = (1 x 5 x 4) = 20.


((MARKS)) 1
(1/2/3...)
((QUESTION In how many ways a committee, consisting of 5 men and 6
)) women can be formed from 8 men and 10 women?
((OPTION_A) 266
)
((OPTION_B) 5040
)
((OPTION_C) 11760
)
((OPTION_D) 86400
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
Required number of ways= (8C5 x 10C6)
((EXPLANAT = (8C3 x 10C4)
ION)) 8 x 7 x 6 10 x 9 x 8 x 7
(OPTIONAL) ( x
= 3x2x1 4x3x2x1 J
= 11760.
((MARKS)) 1
(1/2/3...)
((QUESTION A box contains 2 white balls, 3 black balls and 4
)) red balls. In how many ways can 3 balls be drawn
from the box, if at least one black ball is to be
included in the draw?
((OPTION_A) 64
)
((OPTION_B) 48
)
((OPTION_C) 32
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
We may have(1 black and 2 non-black) or (2 black and 1 non-black) or (3
((EXPLANAT black).
ION))
.. 3 6 3 6 3
(OPTIONAL) Required number of ways= ( C1 x C2) + ( C2 x C1) + ( C3)
(
= 3x
6x5
2x1 )(+
= (45 + 18 + 1)
3x2
2x1 )
x6 +1

= 64.
((MARKS)) 1
(1/2/3...)
((QUESTION In how many ways can 8 Indians and, 4 American and 4
)) Englishmen can be seated in a row so that all person
of the same nationality sit together?
((OPTION_A) 3! 4! 8! 4!
)
((OPTION_B) 3! 8!
)
((OPTION_C) 4! 4!
)
((OPTION_D) 8! 4! 4!
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION In how many ways can 10 examination papers be arranged
)) so that the best and the worst papers never come together?
((OPTION_A) 8*9!
)
((OPTION_B) 8*8!
)
((OPTION_C) 7*9!
)
((OPTION_D) 9*8!
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 2
(1/2/3...)
((QUESTION In the next World cup of cricket there will be 12 teams,
)) divided equally in two groups. Teams of each group will
play a match against each other. From each group 3 top
teams will qualify for the next round. In this round each
team will play against each others once. Four top teams
of this round will qualify for the semifinal round, where
they play the best of three matches. The Minimum number
of matches in the next World cup will be:
((OPTION_A) 54
)
((OPTION_B) 53
)
((OPTION_C) 38
)
((OPTION_D) 43
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION A letter lock consists of 4 rings, each ring contains 9
)) non-zero digits. This lock can be opened by setting four
digit code with the proper combination of each of the 4
rings. Maximum how many codes can be formed to open the

((OPTION_A) 4
9

)
((OPTION_B) 94
)
((OPTION_C) P4
9

)
((OPTION_D) None
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION If 5* nP3 = 4* (n+1)P3, find n?
))
((OPTION_A) 10
)
((OPTION_B) 11
)
((OPTION_C) 12
)
((OPTION_D) 14
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION Ten different letters of alphabet are given, words
)) with 5 letters are formed from these given letters.
Then, the number of words which have at least one
letter repeated is:
((OPTION_A) 69760
)
((OPTION_B) 30240
)
((OPTION_C) 99748
)
((OPTION_D) 42386
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT Number of words which have at least one letter replaced,
= Total number of words - total number of words in which no letter is repeated.
ION)) => 105 – 10P5.
(OPTIONAL) => 100000 − 30240 = 69760.

((MARKS)) 2
(1/2/3...)
((QUESTION 12 chairs are arranged in a row and are numbered 1 to 12.
))
4 men have to be seated in these chairs so that the chairs
numbered 1 to 8 should be occupied and no two men
occupy adjacent chairs. Find the number of ways the
task can be done.
((OPTION_A) 384
)
((OPTION_B) 390
)
((OPTION_C) 432
)
((OPTION_D) 470
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT Given there are 12 numbered chairs, such that chairs numbered 1 to 8 should be
occupied.
ION)) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12.
(OPTIONAL) The various combinations of chairs that ensure that no two men are sitting
together are listed.
(1, 3, 5,__), The fourth chair can be 5,6,10,11 or 12, hence 5 ways.
(1, 4, 8, __), The fourth chair can be 6,10,11 or 12 hence 4 ways.
(1, 5, 8, __), the fourth chair can be 10,11 or 12 hence 3 ways.
(1, 6, 8,__), the fourth chair can be 10,11 or 12 hence 3 ways.
(1,8,10,12) is also one of the combinations.
Hence, 16 such combinations exist.
In case of each these combinations we can make the four men inter arrange in 4!
ways.
Hence, the required result =16�4!= 384.

((MARKS)) 1
(1/2/3...)
((QUESTION What is the probability of drawing 2 kings from a deck
)) (one after another )
((OPTION_A) 0.5%
)
((OPTION_B) 0.4%
)
((OPTION_C) 10%
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION 70% of your friends like chocolate, 35% like chocolate and
)) Strawberry. What % of those who like chocolate also like
Strawberry.
((OPTION_A) 35%
)
((OPTION_B) 50%
)
((OPTION_C) 70%
)
((OPTION_D) 100%
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION You want to be goalkeeper in football final match. It
)) Depends on who is coach that day. With coach Sam
Probability of being Goalkeeper is 0.5. With coach
Alex probability of being Goalkeeper is 0.3. Sam is coach
For 60% time. So what is the probability you being
Goalkeeper for final match?
((OPTION_A) 40%
)
((OPTION_B) 50%
)
((OPTION_C) 60%
)
((OPTION_D) None
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION 5 different books are issued to 5 students (1 for each).
)) Suppose books were returned and again distributed so that
No student can take same book twice, in how many ways
It can be done?
((OPTION_A) 5280
)
((OPTION_B) 6000
)
((OPTION_C) 7000
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION How many different salads can be made from 5 different
)) Fruits, when only one fruit can also be used in a salad.
((OPTION_A) 32
)
((OPTION_B) 31
)
((OPTION_C) 5!
)
((OPTION_D) None
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION How many 4 digit even numbers have all 4 digits distinct?
))
((OPTION_A) 2200
)
((OPTION_B) 504
)
((OPTION_C) 1792
)
((OPTION_D) 2296
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION How many binary sequences are there with length 15 with
)) Exactly 6 ones.
((OPTION_A) 5000
)
((OPTION_B) 15P6
)
((OPTION_C) 5005
)
((OPTION_D) None
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION 4 coins are tossed. Find probability of getting 2 heads and
)) 2 tails.
((OPTION_A) 3/16
)
((OPTION_B) 6/8
)
((OPTION_C) 3/8
)
((OPTION_D) None
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION What will be the coefficient of p11q12 in the expansion of
)) (p+q)23
((OPTION_A) 23!/(11!12!)
)
((OPTION_B) 23!
)
((OPTION_C) 23!/(11!)
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION What will be the coefficient of p5q6 in the expansion of
)) (3p-2q)11
((OPTION_A) 7185024
)
((OPTION_B) 5!*6!
)
((OPTION_C) 1352078
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION nC1+2. nC2+…+n. nCn=?
))
((OPTION_A) n.2n
)
((OPTION_B) n.2n-1
)
((OPTION_C) 2n
)
((OPTION_D) None
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION nC1 - 2. nC2+…+(-1)n-1n. nCn=?
))
((OPTION_A) n
)
((OPTION_B) 1
)
((OPTION_C) 2
)
((OPTION_D) 0
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION Find the term independent of x in the expansion of
)) (x2+1/x3)5
((OPTION_A) 8
)
((OPTION_B) 9
)
((OPTION_C) 10
)
((OPTION_D) None
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION 17n-128n2+112n leaves remainder x when divided by y.
)) What is x and y?
((OPTION_A) x=12, y = 16
)
((OPTION_B) x=1, y = 16
)
((OPTION_C) x=10, y = 162
)
((OPTION_D) x=1, y = 163
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION For any natural number n, 21n-2n-19n*2n-1 is multiple of?
))
((OPTION_A) 359
)
((OPTION_B) 360
)
((OPTION_C) 361
)
((OPTION_D) 362
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION 25100+2599 is divisible by?
))
((OPTION_A) 674
)
((OPTION_B) 675
)
((OPTION_C) 676
)
((OPTION_D) None
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION Of the students in a college, it is known that 60% reside in
)) Hostel and 40% are day scholars (not residing in hostel).
Previous year results report that 30% of all students who
reside in hostel attain A grade and 20% of day scholars
attain A grade in their annual examination. At the end of
the year, one student is chosen at random from the college
and he has an A grade, what is the probability that the
student is a hostlier?

((OPTION_A) 9/13
)
((OPTION_B) 4/13
)
((OPTION_C) 2/13
)
((OPTION_D) 6/13
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT • Given E1,E2,E3.....EnE1,E2,E3.....En are mutually exclusive and exhaustive events, we can find the conditional

ION)) probability P(Ei|A)P(Ei|A) for any event A associated w/ EiEi using the Bayes theorem as

(OPTIONAL) follows: P(Ei/A)P(Ei/A)=P(Ei)P(A/Ei)∑ni=1P(Ei)P(A/Ei)P(Ei)P(A/Ei)∑i=1nP(Ei)P(A/Ei)

Let E1E1: students residing in the hostel →→ P(E1E1) = 60% = 60100=3560100=35

Let E2E2: day scholars →→ P(E2E2) = 40% = 40100=2540100=25

30% of hostel students get an A grade →→ P (E|E1E1) = 30% = 30100=31030100=310

20% of day scholars get an A grade →→ P (E|E2E2) = 20% = 20100=1520100=15

We need to find the probability that a student who is chosen from random that has an A grade is from the hostel.

We can use Baye's theorem, according to

which P(E1|A)=P(E1)(P(A|E1)P(E1)P(A|E1)+P(E2)+P(A|E2)P(E1|A)=P(E1)(P(A|E1)P(E1)P(A|E1)+P(E2)+P(A|E2)

Using Baye's theorem, P (E1E1|A) =35.31035.310+25.1535.31035.310+25.15 = 99+4=913

((MARKS)) 1
(1/2/3...)
((QUESTION In Bayes theorem, what is the meant by P(Hi|E)?
))
((OPTION_A) The probability that hypotheses Hi is true given evidence E
)
((OPTION_B) The probability that hypotheses Hi is false given evidence E
)
((OPTION_C) The probability that hypotheses Hi is true given false
) evidence E
((OPTION_D) The probability that hypotheses Hi is false given false
) evidence E
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION In answering a question on a multiple choice test,
)) a student either knows the answer or guesses. Let
3/4 be the probability that he knows the answer
and 1/4 be the probability that he guesses.
Assuming that a student who guesses at the answer
will be correct with probability 1/4 . What is
the probability that the student knows the answer
given that he answered it correctly?
((OPTION_A) 1/13
)
((OPTION_B) 12/13
)
((OPTION_C) 6/13
)
((OPTION_D) 8/13
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION A factory has two machines A and B. Past record shows
)) that machine A produced 60% of the items of output
and machine B produced 40% of the items. Further,
2% of the items produced by machine A and 1%
produced by machine B were defective. All the items
are put into one stockpile and then one item is chosen
at random from this and is found to be defective.
What is the probability that it was produced by
machine B?
((OPTION_A) ½
)
((OPTION_B) 1/3
)
((OPTION_C) ¼
)
((OPTION_D) 1/5
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION There are three coins. One is a two headed coin
)) (having head on both faces), another is a biased
coin that comes up heads 75% of the time and third
is an unbiased coin. One of the three coins is chosen
at random and tossed, it shows heads, what is the
probability that it was the two headed coin ?

((OPTION_A) ½
)
((OPTION_B) 3/5
)
((OPTION_C) 2/6
)
((OPTION_D) 4/9
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION A bag contains 4 red and 4 black balls, another
)) bag contains 2 red and 6 black balls. One of the two
bags is selected at random and a ball is drawn from
the bag which is found to be red. Find the probability
that the ball is drawn from the first bag.

((OPTION_A) 1/3
)
((OPTION_B) 2/3
)
((OPTION_C) ¼
)
((OPTION_D) 3/7
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION From a group of 7 men and 6 women, five persons are to be
)) selected to form a committee so that at least 3 men are
there on the committee. In how many ways can it be done?
((OPTION_A) 564
)
((OPTION_B) 645
)
((OPTION_C) 735
)
((OPTION_D) 756
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
We may have (3 men and 2 women) or (4 men and 1 woman) or (5 men
((EXPLANAT only).
ION))
.. 7 6 7 6 7
(OPTIONAL) Required number of ways= ( C3 x C2) + ( C4 x C1) + ( C5)
7x6x5 6x5
= x + (7C3 x 6C1) + (7C2)
( (
3x2x1 2x1
= 525 +
7x6x5
3x2x1
) )[ J
x6 +
7x6
2x1
= (525 + 210 + 21)
= 756.
((MARKS)) 1
(1/2/3...)
((QUESTION)) How many 2 digits numbers can be formed from
the digits 0, 1, 2, 3, 4, 5 ?
((OPTION_A)) 5 x 6
((OPTION_B)) 52
((OPTION_C)) 62
((OPTION_D)) 50
((CORRECT_C A
HOICE))
(A/B/C/D)
((EXPLANATI To form two digit number, the first digit must be non-zero
ON)) and second may be any digit.
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION)) In how many ways 4 boys and 3 girls can be seated in
a row so that they are alternate.
((OPTION_A)) 144
((OPTION_B)) 288
((OPTION_C)) 12
((OPTION_D)) 256
((CORRECT_C A
HOICE))
(A/B/C/D)
((EXPLANATI Let the Arrangement be,
ON)) BGBGBGB
(OPTIONAL)
4 boys can be seated in 4! Ways.
Girl can be seated in 3! Ways.
Required number of ways,
= 4!*3! = 144.
((MARKS)) 2
(1/2/3...)
((QUESTION)) There are 30 people in a party. If everyone is to shake
hands with one another, how many hand shakes are
possible?
((OPTION_A)) 180
((OPTION_B)) 256
((OPTION_C)) 386
((OPTION_D)) 435
((CORRECT_C D
HOICE))
(A/B/C/D)
((EXPLANATI Total number of persons = n = 30
ON)) Shake hands involve only 2 persons = r = 2
(OPTIONAL) Number of shake hands = nCr = 30C2
30
C2 = (30 * 29) /(2 * 1) = 435
n
Cr = (n!) / r! (n – r)!
= 30! / 2! 28!
= 435
((MARKS)) 1
(1/2/3...)
((QUESTION)) A man positioned at the origin of the coordinate system.
The man can take steps of unit measure in the direction
North, East, West or South. Find the number of ways of
he can reach the point (5,6), covering the shortest
possible distance.
((OPTION_A)) 252
((OPTION_B)) 432
((OPTION_C)) 462
((OPTION_D)) 504
((CORRECT_C C
HOICE))
(A/B/C/D)
((EXPLANATI In order to reach (5,6) covering the shortest distance at the
ON)) same time the man has to make 5 horizontal and 6 vertical
(OPTIONAL) steps.
The number of ways in which these steps can be taken is
given by:
11! /(5! *6!) = 462
((MARKS)) 2
(1/2/3...)
((QUESTION)) a,b,c,d and e are five natural numbers. Find the number
of ordered sets (a,b,c,d,e) possible such that :
a + b + c + d + e =64
((OPTION_A)) 64
C5
((OPTION_B)) 68
C4
((OPTION_C)) 65
C4
((OPTION_D)) 63
C5
((CORRECT_C B
HOICE))
(A/B/C/D)
((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION In how many different ways can the letters of the
)) word 'LEADING' be arranged in such a way that the
vowels always come together?
((OPTION_A) 360
)
((OPTION_B) 480
)
((OPTION_C) 720
)
((OPTION_D) 5040
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
The word 'LEADING' has 7 different letters.
((EXPLANAT
ION)) When the vowels EAI are always together, they can be supposed to form one
(OPTIONAL) letter.
Then, we have to arrange the letters LNDG (EAI).

Now, 5 (4 + 1 = 5) letters can be arranged in 5! = 120 ways.

The vowels (EAI) can be arranged among themselves in 3! = 6 ways.

Required number of ways = (120 x 6) = 720.


((MARKS)) 1
(1/2/3...)
((QUESTION)) How many 6 digit telephone numbers can be formed if
each number starts with 35 and no digit appears more
than once?
((OPTION_A)) 720
((OPTION_B)) 360
((OPTION_C)) 1420
((OPTION_D)) 1680
((CORRECT_C D
HOICE))
(A/B/C/D)
((EXPLANATI The first two places can only be filled by 3 and 5
ON)) respectively and there is only 1 way for doing this.
(OPTIONAL) Given that no digit appears more than once. Hence we
have 8 digits remaining (0,1,2,4,6,7,8,9)
So, the next 4 places can be filled with the remaining 8
digits in 8P4 ways.
Total number of ways = 8P4 =8×7×6×5=1680
((MARKS)) 2
(1/2/3...)
((QUESTION In how many different ways can the letters of the word
)) 'CORPORATION' be arranged so that the vowels always
come together?
((OPTION_A) 810
)
((OPTION_B) 1440
)
((OPTION_C) 2880
)
((OPTION_D) 50400
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
In the word 'CORPORATION', we treat the vowels OOAIO as one letter.
((EXPLANAT
ION)) Thus, we have CRPRTN (OOAIO).
(OPTIONAL)
This has 7 (6 + 1) letters of which R occurs 2 times and the rest are different.

7!
Number of ways arranging these letters = = 2520.
2!

Now, 5 vowels in which O occurs 3 times and the rest are different, can be
arranged

5!
in = 20 ways.
3!

Required number of ways = (2520 x 20) = 50400.


((MARKS)) 1
(1/2/3...)
((QUESTION)) 25 buses are running between two places P and Q.
In how many ways can a person go from P to Q and
return by a different bus?
((OPTION_A)) None of these
((OPTION_B)) 600
((OPTION_C)) 576
((OPTION_D)) 625
((CORRECT_C B
HOICE))
(A/B/C/D)
((EXPLANATI He can go in any of the 25 buses (25 ways).
ON))
(OPTIONAL)
Since he cannot come back in the same bus, he can return
in 24 ways.

Total number of ways =25×24=600


((MARKS)) 2
(1/2/3...)
A question paper consists of 10 questions divided into two parts A and B.
((QUESTION)) Each part contains five questions. A candidate is required to attempt six
questions in all of which at least 2 should be from part A and at least 2
from part B. In how many ways can the candidate select the questions if
he can answer all questions equally well?
((OPTION_A)) 500
((OPTION_B)) 100
((OPTION_C)) 150
((OPTION_D)) 200
((CORRECT_C D
HOICE))
(A/B/C/D)
((EXPLANATI The candidate has to select six questions in all of which at least two
should be from Part A and two should be from Part B. He can select
ON))
questions in any of the following ways:
(OPTIONAL)
Choice Part A Part B
(i) 2 4
(ii) 3 3
(iii) 4 2

If the candidate follows choice (i), the number of ways in


which he can do so is:
5
C2×5C4=10×5=50
If the candidate follows choice (ii), the number of ways in
which he can do so is:
5
C3×5C3=10×10=100
Similarly, if the candidate follows choice (iii), then the
number of ways in which he can do so is:
5
C4×5C2=5×10=50
Therefore, the candidate can select the question in
50+100+50 = 200 ways.
((MARKS)) 2
(1/2/3...)
((QUESTION Out of 7 consonants and 4 vowels, how many words of 3
)) consonants and 2 vowels can be formed?
((OPTION_A) 210
)
((OPTION_B) 1050
)
((OPTION_C) 25200
)
((OPTION_D) 21400
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
Number of ways of selecting (3 consonants out of 7) and (2 vowels out of 4)
((EXPLANAT
ION)) = (7C3 x 4C2)
(OPTIONAL) 7x6x5 4x3
=( x
3x2x1 2x1 J
= 210.

Number of groups, each having 3 consonants and 2 vowels = 210.

Each group contains 5 letters.

Number of ways of arranging


= 5!
5 letters among themselves
=5x4x3x2x1
= 120.

.. Required number of ways = (210 x 120) = 25200.


((MARKS)) 1
(1/2/3...)
((QUESTION In how many ways can the letters of the word
)) 'LEADER' be arranged?
((OPTION_A) 720
)
((OPTION_B) 360
)
((OPTION_C) 144
)
((OPTION_D) 72
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
The word 'LEADER' contains 6 letters, namely 1L, 2E, 1A, 1D and 1R.
((EXPLANAT
ION)) Required number of ways =
6!
= 360.
(OPTIONAL) (1!)(2!)(1!)(1!)(1!)
((MARKS)) 1
(1/2/3...)
((QUESTION How many 3-digit numbers can be formed from the digits
)) 2, 3, 5, 6, 7 and 9, which are divisible by 5 and
none of the digits is repeated?
((OPTION_A) 5
)
((OPTION_B) 10
)
((OPTION_C) 15
)
((OPTION_D) 20
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
Since each desired number is divisible by 5, so we must have 5 at the unit
((EXPLANAT place. So, there is 1 way of doing it.
ION))
(OPTIONAL) The tens place can now be filled by any of the remaining 5 digits (2, 3, 6, 7,
9). So, there are 5 ways of filling the tens place.

The hundreds place can now be filled by any of the remaining 4 digits. So,
there are 4 ways of filling it.

Required number of numbers = (1 x 5 x 4) = 20.


((MARKS)) 1
(1/2/3...)
((QUESTION In how many ways a committee, consisting of 5 men and 6
)) women can be formed from 8 men and 10 women?
((OPTION_A) 266
)
((OPTION_B) 5040
)
((OPTION_C) 11760
)
((OPTION_D) 86400
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
Required number of ways= (8C5 x 10C6)
((EXPLANAT = (8C3 x 10C4)
ION)) 8 x 7 x 6 10 x 9 x 8 x 7
(OPTIONAL) ( x
= 3x2x1 4x3x2x1 J
= 11760.
((MARKS)) 1
(1/2/3...)
((QUESTION A box contains 2 white balls, 3 black balls and 4
)) red balls. In how many ways can 3 balls be drawn
from the box, if at least one black ball is to be
included in the draw?
((OPTION_A) 64
)
((OPTION_B) 48
)
((OPTION_C) 32
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
We may have(1 black and 2 non-black) or (2 black and 1 non-black) or (3
((EXPLANAT black).
ION))
.. 3 6 3 6 3
(OPTIONAL) Required number of ways= ( C1 x C2) + ( C2 x C1) + ( C3)
(
= 3x
6x5
2x1 )(+
= (45 + 18 + 1)
3x2
2x1 )
x6 +1

= 64.
((MARKS)) 1
(1/2/3...)
((QUESTION In how many ways can 8 Indians and, 4 American and 4
)) Englishmen can be seated in a row so that all person
of the same nationality sit together?
((OPTION_A) 3! 4! 8! 4!
)
((OPTION_B) 3! 8!
)
((OPTION_C) 4! 4!
)
((OPTION_D) 8! 4! 4!
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION In how many ways can 10 examination papers be arranged
)) so that the best and the worst papers never come together?
((OPTION_A) 8*9!
)
((OPTION_B) 8*8!
)
((OPTION_C) 7*9!
)
((OPTION_D) 9*8!
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 2
(1/2/3...)
((QUESTION In the next World cup of cricket there will be 12 teams,
)) divided equally in two groups. Teams of each group will
play a match against each other. From each group 3 top
teams will qualify for the next round. In this round each
team will play against each others once. Four top teams
of this round will qualify for the semifinal round, where
they play the best of three matches. The Minimum number
of matches in the next World cup will be:
((OPTION_A) 54
)
((OPTION_B) 53
)
((OPTION_C) 38
)
((OPTION_D) 43
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION A letter lock consists of 4 rings, each ring contains 9
)) non-zero digits. This lock can be opened by setting four
digit code with the proper combination of each of the 4
rings. Maximum how many codes can be formed to open the

((OPTION_A) 4
9

)
((OPTION_B) 94
)
((OPTION_C) P4
9

)
((OPTION_D) None
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION If 5* nP3 = 4* (n+1)P3, find n?
))
((OPTION_A) 10
)
((OPTION_B) 11
)
((OPTION_C) 12
)
((OPTION_D) 14
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION Ten different letters of alphabet are given, words
)) with 5 letters are formed from these given letters.
Then, the number of words which have at least one
letter repeated is:
((OPTION_A) 69760
)
((OPTION_B) 30240
)
((OPTION_C) 99748
)
((OPTION_D) 42386
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT Number of words which have at least one letter replaced,
= Total number of words - total number of words in which no letter is repeated.
ION)) => 105 – 10P5.
(OPTIONAL) => 100000 − 30240 = 69760.

((MARKS)) 2
(1/2/3...)
((QUESTION 12 chairs are arranged in a row and are numbered 1 to 12.
))
4 men have to be seated in these chairs so that the chairs
numbered 1 to 8 should be occupied and no two men
occupy adjacent chairs. Find the number of ways the
task can be done.
((OPTION_A) 384
)
((OPTION_B) 390
)
((OPTION_C) 432
)
((OPTION_D) 470
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT Given there are 12 numbered chairs, such that chairs numbered 1 to 8 should be
occupied.
ION)) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12.
(OPTIONAL) The various combinations of chairs that ensure that no two men are sitting
together are listed.
(1, 3, 5,__), The fourth chair can be 5,6,10,11 or 12, hence 5 ways.
(1, 4, 8, __), The fourth chair can be 6,10,11 or 12 hence 4 ways.
(1, 5, 8, __), the fourth chair can be 10,11 or 12 hence 3 ways.
(1, 6, 8,__), the fourth chair can be 10,11 or 12 hence 3 ways.
(1,8,10,12) is also one of the combinations.
Hence, 16 such combinations exist.
In case of each these combinations we can make the four men inter arrange in 4!
ways.
Hence, the required result =16�4!= 384.

((MARKS)) 1
(1/2/3...)
((QUESTION What is the probability of drawing 2 kings from a deck
)) (one after another )
((OPTION_A) 0.5%
)
((OPTION_B) 0.4%
)
((OPTION_C) 10%
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION 70% of your friends like chocolate, 35% like chocolate and
)) Strawberry. What % of those who like chocolate also like
Strawberry.
((OPTION_A) 35%
)
((OPTION_B) 50%
)
((OPTION_C) 70%
)
((OPTION_D) 100%
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION You want to be goalkeeper in football final match. It
)) Depends on who is coach that day. With coach Sam
Probability of being Goalkeeper is 0.5. With coach
Alex probability of being Goalkeeper is 0.3. Sam is coach
For 60% time. So what is the probability you being
Goalkeeper for final match?
((OPTION_A) 40%
)
((OPTION_B) 50%
)
((OPTION_C) 60%
)
((OPTION_D) None
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION 5 different books are issued to 5 students (1 for each).
)) Suppose books were returned and again distributed so that
No student can take same book twice, in how many ways
It can be done?
((OPTION_A) 5280
)
((OPTION_B) 6000
)
((OPTION_C) 7000
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION How many different salads can be made from 5 different
)) Fruits, when only one fruit can also be used in a salad.
((OPTION_A) 32
)
((OPTION_B) 31
)
((OPTION_C) 5!
)
((OPTION_D) None
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION How many 4 digit even numbers have all 4 digits distinct?
))
((OPTION_A) 2200
)
((OPTION_B) 504
)
((OPTION_C) 1792
)
((OPTION_D) 2296
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION How many binary sequences are there with length 15 with
)) Exactly 6 ones.
((OPTION_A) 5000
)
((OPTION_B) 15P6
)
((OPTION_C) 5005
)
((OPTION_D) None
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION 4 coins are tossed. Find probability of getting 2 heads and
)) 2 tails.
((OPTION_A) 3/16
)
((OPTION_B) 6/8
)
((OPTION_C) 3/8
)
((OPTION_D) None
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION What will be the coefficient of p11q12 in the expansion of
)) (p+q)23
((OPTION_A) 23!/(11!12!)
)
((OPTION_B) 23!
)
((OPTION_C) 23!/(11!)
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION What will be the coefficient of p5q6 in the expansion of
)) (3p-2q)11
((OPTION_A) 7185024
)
((OPTION_B) 5!*6!
)
((OPTION_C) 1352078
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION nC1+2. nC2+…+n. nCn=?
))
((OPTION_A) n.2n
)
((OPTION_B) n.2n-1
)
((OPTION_C) 2n
)
((OPTION_D) None
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION nC1 - 2. nC2+…+(-1)n-1n. nCn=?
))
((OPTION_A) n
)
((OPTION_B) 1
)
((OPTION_C) 2
)
((OPTION_D) 0
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION Find the term independent of x in the expansion of
)) (x2+1/x3)5
((OPTION_A) 8
)
((OPTION_B) 9
)
((OPTION_C) 10
)
((OPTION_D) None
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION 17n-128n2+112n leaves remainder x when divided by y.
)) What is x and y?
((OPTION_A) x=12, y = 16
)
((OPTION_B) x=1, y = 16
)
((OPTION_C) x=10, y = 162
)
((OPTION_D) x=1, y = 163
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION For any natural number n, 21n-2n-19n*2n-1 is multiple of?
))
((OPTION_A) 359
)
((OPTION_B) 360
)
((OPTION_C) 361
)
((OPTION_D) 362
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION 25100+2599 is divisible by?
))
((OPTION_A) 674
)
((OPTION_B) 675
)
((OPTION_C) 676
)
((OPTION_D) None
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION Of the students in a college, it is known that 60% reside in
)) Hostel and 40% are day scholars (not residing in hostel).
Previous year results report that 30% of all students who
reside in hostel attain A grade and 20% of day scholars
attain A grade in their annual examination. At the end of
the year, one student is chosen at random from the college
and he has an A grade, what is the probability that the
student is a hostlier?

((OPTION_A) 9/13
)
((OPTION_B) 4/13
)
((OPTION_C) 2/13
)
((OPTION_D) 6/13
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT • Given E1,E2,E3.....EnE1,E2,E3.....En are mutually exclusive and exhaustive events, we can find the conditional

ION)) probability P(Ei|A)P(Ei|A) for any event A associated w/ EiEi using the Bayes theorem as

(OPTIONAL) follows: P(Ei/A)P(Ei/A)=P(Ei)P(A/Ei)∑ni=1P(Ei)P(A/Ei)P(Ei)P(A/Ei)∑i=1nP(Ei)P(A/Ei)

Let E1E1: students residing in the hostel →→ P(E1E1) = 60% = 60100=3560100=35

Let E2E2: day scholars →→ P(E2E2) = 40% = 40100=2540100=25

30% of hostel students get an A grade →→ P (E|E1E1) = 30% = 30100=31030100=310

20% of day scholars get an A grade →→ P (E|E2E2) = 20% = 20100=1520100=15

We need to find the probability that a student who is chosen from random that has an A grade is from the hostel.

We can use Baye's theorem, according to

which P(E1|A)=P(E1)(P(A|E1)P(E1)P(A|E1)+P(E2)+P(A|E2)P(E1|A)=P(E1)(P(A|E1)P(E1)P(A|E1)+P(E2)+P(A|E2)

Using Baye's theorem, P (E1E1|A) =35.31035.310+25.1535.31035.310+25.15 = 99+4=913

((MARKS)) 1
(1/2/3...)
((QUESTION In Bayes theorem, what is the meant by P(Hi|E)?
))
((OPTION_A) The probability that hypotheses Hi is true given evidence E
)
((OPTION_B) The probability that hypotheses Hi is false given evidence E
)
((OPTION_C) The probability that hypotheses Hi is true given false
) evidence E
((OPTION_D) The probability that hypotheses Hi is false given false
) evidence E
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION In answering a question on a multiple choice test,
)) a student either knows the answer or guesses. Let
3/4 be the probability that he knows the answer
and 1/4 be the probability that he guesses.
Assuming that a student who guesses at the answer
will be correct with probability 1/4 . What is
the probability that the student knows the answer
given that he answered it correctly?
((OPTION_A) 1/13
)
((OPTION_B) 12/13
)
((OPTION_C) 6/13
)
((OPTION_D) 8/13
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION A factory has two machines A and B. Past record shows
)) that machine A produced 60% of the items of output
and machine B produced 40% of the items. Further,
2% of the items produced by machine A and 1%
produced by machine B were defective. All the items
are put into one stockpile and then one item is chosen
at random from this and is found to be defective.
What is the probability that it was produced by
machine B?
((OPTION_A) ½
)
((OPTION_B) 1/3
)
((OPTION_C) ¼
)
((OPTION_D) 1/5
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION There are three coins. One is a two headed coin
)) (having head on both faces), another is a biased
coin that comes up heads 75% of the time and third
is an unbiased coin. One of the three coins is chosen
at random and tossed, it shows heads, what is the
probability that it was the two headed coin ?

((OPTION_A) ½
)
((OPTION_B) 3/5
)
((OPTION_C) 2/6
)
((OPTION_D) 4/9
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION A bag contains 4 red and 4 black balls, another
)) bag contains 2 red and 6 black balls. One of the two
bags is selected at random and a ball is drawn from
the bag which is found to be red. Find the probability
that the ball is drawn from the first bag.

((OPTION_A) 1/3
)
((OPTION_B) 2/3
)
((OPTION_C) ¼
)
((OPTION_D) 3/7
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The bit strings for the sets are 1111100000 and
1010101010. The union of these sets is ____________.

((OPTION_A)) 1010100000

((OPTION_B)) 1010101101

((OPTION_C)) 1111111100

((OPTION_D)) 1111101010

((CORRECT_C D
HOICE))
(A/B/C/D)

((EXPLANATI The bit string for the union is the bitwise OR of the bit strings
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The set difference of the set A with null set


is ________.

((OPTION_A)) A

((OPTION_B)) Null

((OPTION_C)) U

((OPTION_D)) B

((CORRECT_C A
HOICE))
(A/B/C/D)

((EXPLANATI The set difference of the set A by null set denoted by A – {null} is A.
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The complement of the set A is _____________.

((OPTION_A)) A– B

((OPTION_B)) U –A

((OPTION_C)) A– U

((OPTION_D)) B –A

((CORRECT_C B
HOICE))
(A/B/C/D)

((EXPLANATI The complement of the set A is the complement of A with respect to U


ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The difference of {1, 2, 3} and {1, 2, 5} is the set _________.

((OPTION_A)) {1}

((OPTION_B)) {5}

((OPTION_C)) {3}

((OPTION_D)) {2}

((CORRECT_C C
HOICE))
(A/B/C/D)

((EXPLANATI The difference of the sets A and B denoted by A-B, is the set containing
ON)) those elements that are in A not in B.
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) Which of the following two sets are disjoint?

((OPTION_A)) {1, 3, 5} and {1, 3, 6}

((OPTION_B)) {1, 2, 3} and {1, 2, 3}

((OPTION_C)) {1, 3, 5} and {2, 3, 4}

((OPTION_D)) {1, 3, 5} and {2, 4, 6}

((CORRECT_C D
HOICE))
(A/B/C/D)

((EXPLANATI Two sets are disjoint if the intersection of two sets is the empty set.
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) Two sets are called disjoint if there _____________ is the


empty set

((OPTION_A)) Union

((OPTION_B)) Difference

((OPTION_C)) Intersection

((OPTION_D)) Complement

((CORRECT_C C
HOICE))
(A/B/C/D)

((EXPLANATI By the definition of the disjoint set.


ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The members of the set S = {x | x is the square of an


integer and x < 100} is _________________.

((OPTION_A)) {0, 2, 4, 5, 9, 58, 49, 56, 99, 12}

((OPTION_B)) {0, 1, 4, 9, 16, 25, 36, 49, 64, 81}

((OPTION_C)) {1, 4, 9, 16, 25, 36, 64, 81, 85, 99}

((OPTION_D)) {0, 1, 4, 9, 16, 25, 36, 49, 64, 121}

((CORRECT_C B
HOICE))
(A/B/C/D)

((EXPLANATI The set S consists of the square of an integer less than 10


ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) What is the Cardinality of the Power set of the set {0, 1, 2}.

((OPTION_A)) 8

((OPTION_B)) 7

((OPTION_C)) 6

((OPTION_D)) 9

((CORRECT_C A
HOICE))
(A/B/C/D)

((EXPLANATI Power set P ({0, 1, 2}) is the set of all subsets of {0, 1, 2}. Hence
ON)) P({0, 1, 2}) = {null , {0}, {1}, {2}, {0, 1}, {0,2}, {1, 2}, {0, 1, 2}}.
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The set of positive integers is _________

((OPTION_A)) Infinite

((OPTION_B)) Finite

((OPTION_C)) Subset

((OPTION_D)) Empty

((CORRECT_C A
HOICE))
(A/B/C/D)

((EXPLANATI The set of positive integers is not finite.


ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) Which of the following statement is true

((OPTION_A)) The power set of any set is always a non empty set

((OPTION_B)) The power set of a set can be a null set

((OPTION_C)) The power set of an empty set is empty

((OPTION_D)) The power set may have odd number of elements in it

((CORRECT_C A
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 2
(1/2/3...)

((QUESTION)) In a class of 25 students, if 10 students have play guitar and 15 students play
mandolin, and 3 students can’t play any one of them. Then how many
students can play only guitar.

((OPTION_A)) 10

((OPTION_B)) 15

((OPTION_C)) 3

((OPTION_D)) 7

((CORRECT_C D
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 2
(1/2/3...)

((QUESTION)) If A represents a set of students knowing Marathi and B represents students


knowing Hindi, then the number of students knowing only Marathi is given
by

((OPTION_A)) |AUB|-|B|+|A∩B|

((OPTION_B)) |AUB|-|B||

((OPTION_C)) |A-B|

((OPTION_D)) Both A and B

((CORRECT_C D
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 2
(1/2/3...)

((QUESTION)) (p->q)->p is equal to

((OPTION_A)) p->q

((OPTION_B)) p

((OPTION_C)) q

((OPTION_D)) ~q

((CORRECT_C D
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 2
(1/2/3...)

((QUESTION)) (p->q)->q is equal to

((OPTION_A)) p

((OPTION_B)) q

((OPTION_C)) pVq

((OPTION_D)) ~(~pV~q)

((CORRECT_C C
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) Which of the following statement is false

((OPTION_A)) An uncountable is always infinite

((OPTION_B)) An infinite set is always uncountable

((OPTION_C)) A finite set is always countable

((OPTION_D)) Set of natural numbers is countable

((CORRECT_C B
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) Mathematical induction is used to

((OPTION_A)) Solve mathematical series problems

((OPTION_B)) Solve complex formulae

((OPTION_C)) Prove the formulae

((OPTION_D)) Derive the formulae

((CORRECT_C C
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The cardinality of a set indicates

((OPTION_A)) The elements present in the set

((OPTION_B)) The type of elements present in the set

((OPTION_C)) The number of elements present in the set

((OPTION_D)) The name of the set

((CORRECT_C C
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The power set of a set A is represented as

((OPTION_A)) P(A)

((OPTION_B)) 2P

((OPTION_C)) Both A and B

((OPTION_D)) Ø

((CORRECT_C C
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The truth value of tautology is always

((OPTION_A)) True

((OPTION_B)) False

((OPTION_C)) Depends on the proposition

((OPTION_D)) Null

((CORRECT_C A
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)

((QUESTION)) The truth value of contradiction is always

((OPTION_A)) True

((OPTION_B)) False

((OPTION_C)) Depends on the proposition

((OPTION_D)) Null

((CORRECT_C B
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 2
(1/2/3...)

((QUESTION)) Given that the value of p->q is false what is the value of (~pV~q)->q

((OPTION_A)) False

((OPTION_B)) True

((OPTION_C)) pVq

((OPTION_D)) None of the above

((CORRECT_C A
HOICE))
(A/B/C/D)

((EXPLANATI
ON))
(OPTIONAL)
Id 1
Question Which of these sets is finite?
A {x | x is even}
B {1, 2, 3,...}
C {1, 2, 3,...,999,1000}
D None of above
Answer C
Id 2
Question Which of these sets is not a null set if x is integer?
A A = {x | 6x = 24 and 3x = 1}
B B = {x | x + 10 = 10}
C C = {x | x is a man older than 200 years}
D D = {x | x < x}
Answer B

Id 3
Question The number of elements in the power set P(S) of the set S={{Ф},1,{1,2,3} is
A 2
B 4
C 8
D 10
Answer C

Id 4
Question A theory of sets was firstly introduced by….
A Tim berners lee
B Franklin
C Canter
D Panther
Answer C

Id 5
Question In the figure opposite, U = { a,
b, c, d, e, f, g, h }. (X∩Y) U Z
=?
u

A {c,e,f,g,h}
B {e,f,g}
C {f}
D {c,f,h}
Answer A

Id 6
Question Which of the following diagrams indicates the best relation between Hospital, Nurse
and Patient ?
A

@
B

~
C
@
D

@o
Answer C

Id 7
Question In the figure below, the shaded portion represents?

X _____,..__ u

A (X∩ Z) U Y
B (X ∩ Y) U Z
C (Z ∩ Y) U X
D (Y∩ Z) U X
Answer B

Id 8
Question In the figure below, the shaded portion represents?

A (AUC) ∩ B
B (BUA)∩ C
C ~(A U C)
D ~(A) U ~(C)
Answer C

Id 9
Question What is shaded in the Venn diagram below?.
A AUB
B ~(A)
C A­B
D B­A
Answer C

Id 10
Question Some girls play netball and Some girls are tall in class.
Tall girls are over 1.8 meters in height. All netball players are tall girls.
Lee is 1.9 meters tall and does not play netball.
Which Venn diagram below represents the statements above?
U= Girls P= Plays Netball D= Does Not Play T= Tall Girls

u
B
0i!e
u
C

l®lu
D

l®lu
Answer B
Id 11
Question Which of the following diagrams indicates the best relation between India, Hariyana
and World ?

@o
B
00
0
C

@
D

@)
Answer D

Id 12
Question Which of the following proposition is a tautology?
A (p v q)→p
B p v (q→p)
C p v (p→q)
D p→(p→q)
Answer C

Id 13
Question Set A has 3 elements, set B has 6 elements, then the minimum number of elements in
A U B is
A 6
B 9
C 18
D None of above
Answer B

Id 14
Question Consider the statement,“If n is divisible by 30 then n is divisible by 2 and by 3 and
by 5.”Which of the following statements is equivalent to this statement?
A If n is not divisible by 30 then n is divisible by 2 or divisible by 3 or divisible by 5
B If n is not divisible by 30 then n is not divisible by 2 or not divisible by 3 or not divisible
by 5
C If n is divisible by 2 and divisible by 3 and divisible by 5 then n is divisible by 30.
D If n is not divisible by 2 or not divisible by 3 or not divisible by 5 then n is not divisible
by 30
Answer D

Id 15
Question Suppose N={1,2,3……}is the universal set &
A={x:x<=6},B={x:4<=x<=9},C={1,3,5,7,9},D={2,3,5,7,9}
find (C ∩Β) ∪ (Α∩D)
A {1,3,4,6,8}
B {2,3,5,7,9}
C {2,3,4,6}
D {1,2,3,7}
Answer B

Id 16
Question If two sets A and B have no common elements then such sets are known as?
A Intersection
B Union
C Disjoint
D Complement
Answer C

Id 17
Question The contrapositive of p →q is
A q →p
B ¬p →¬q
C ¬q →¬p
D p →¬q
Answer C
Id 18
Question The Converse of p →q is
A q →p
B ¬p → ¬q
C ¬q → ¬p
D p → ¬q
Answer A

Id 19
Question The Inverse of p →q is
A q →p
B ¬p → ¬q
C ¬q → ¬p
D p → ¬q
Answer B

Id 20
Question p ↔ q is logically equivalent to

A (p → q) Λ (q → p)
B ¬q → ¬p

C ¬q
D ¬p
Answer A

Id 21
Question p ↔ q is logically equivalent to
A (p Λ q) V (¬p Λ ¬q)
B ¬p → ¬q
C ¬p V q
D ¬q
Answer A

Id 22
Question p↔q Ξ

A ¬p ↔ ¬q
B ¬p ↔ q
C p ↔ ¬q
D q↔p
Answer A

Id 23
Question ¬ (p → q) Ξ

A ¬p V q
B p ¬q
C p Λ ¬q
D ¬p Λ q
Answer C

Id 24
Question Which of the following is Tautology
A p → (p q )
B (p Λ q) → q
C p Λ ¬q(p Λ q) V (¬p Λ ¬q)
D Both (a) and (b)
Answer D

Id 25
Question (p Λ q) → (p → q) is
A Contradiction
B Tautology
C Contingency
D Well form formula.
Answer B

Id 26
Question ¬ (p V (¬p Λ q)) is logically equivalent to
A ¬p Λ q
B ¬p Λ ¬q
C ¬p V ¬q
D p Λ ¬q
Answer B

Id 27
Question A compound proposition obtained from another compound proposition containing Λ V or
¬ operators, by replacing Λ with V, V with Λ each ¬ by F and each F by T is
A Disjunctive normal form
B Conjunctive normal form
C Dual
D Principal Disjunctive normal form
Answer C

Id 28
Question "P (x) for all values of x in the domain" denotes
A existential quantification
B universal quantification
C counter quantification
D none of these
Answer B

Id 29
Question "There exists an element x in the domain such that P (x)" denotes.
A existential quantification
B universal quantification
C counter quantification
D none of these
Answer A

Id 30
Question The quantifiers ∀ and ∃ have ………… precedence than all the logical operators from
propositional calculus.
A lower
B equal
C high
D can't say
Answer C

Id 31
Question ¬∀ x P (x) is logically equivalent to
A ∀ x ¬ P (x)
B ∃ x ¬ P (x)
C ∀ x ¬ P(x)
D ¬ ∃ x P (x)
Answer B

Id 32
Question ¬∃ x p (x) is logically equivalent to
A ∀ x ¬ P (x)
B ∃ x ¬ P (x)
C ∀ x ¬ P (x)
D ¬ ∃ x P (x)
Answer C

Id 33
Question ¬∀ x (P (x) → Q (x)) is logically equivalent to
A ∀ x ¬ (P (x) Λ Q (x))
B ∃ x ¬ (P (x) Λ Q (x))
C ∀ x (P (x) Λ Q (x))
D ∃ x P (x) Λ ¬Q (x)
Answer D

Id 34
Question Let P (x) denote x is even over the universe of integers. Then symbolic representation of
“At least one integer is even” is
A ∃ x P (x)
B ∀ x P (x)
C ¬ ∃ x P (x)
D ∃ x ¬ P (x)
Answer A

Id 35
Question Let C(x) denote x is comedian. F(x) x is funny. Then statement "All comedians are funny”
is
A ∀ x (C (x) → F (x))
B ∀ x (C (x) Λ F (x))
C ∃ x (C (x) → F (x))
D ∃ x (C (x) Λ F (x))
Answer A

Id 36
Question Let C(x) denote x is comedian. F(x) x is funny. Then statement "Every person is funny
comedian"
A ∀ x (C (x) → F (x))
B ∀ x (C (x) Λ F (x))
C ∃ x (C (x) → F (x))
D ∃ x (C (x) Λ F (x))
Answer B

Id 37
Question Let C(x) denote x is comedian. F(x) x is funny. Then statement “There exists a person if
he or she is comedian, then he or she is funny” is
A ∀ x (C (x) → F (x))
B ∀ x (C (x) Λ F (x))
C ∃ x (C (x) → F (x))
D ∃ x (C (x) Λ F (x))
Answer C

Id 38
Question Let C(x) denote x is comedian. F(x) x is funny. Then statement “Some comedians are
funny” is
A ∀ x (C (x) → F (x))
B ∀ x (C (x) Λ F (x))
C ∃ x (C (x) → F (x))
D ∃ x (C (x) Λ F (x))
Answer D

Id 39
Question Let P (x) denote x spends more than six hours every weekday in class. Then the statement
" There is a student who spends more than six hours everyday in class." is
A ∃ x P (x)
B ∀ x P (x)
C ∃ x ¬P (x)
D ∀ x ¬ P (x)
Answer A

Id 40
Question Let P (x) denote x spends more than six hours every weekday in class. Then the statement
“Every student spends more than six hours every weekday in class “ is
A ∃ x P (x)
B ∀ x P (x)
C ∃ x ¬P (x)
D ∀ x ¬ P (x)
Answer B

Id 41
Question Let P (x) denote x spends more than six hours every weekday in class. Then the statement
“There is a student who does not spend more than six hours every weekday in class “ is
A ∃ x P (x)
B ∀ x P (x)
C ∃ x ¬P (x)
D ∀ x ¬ P (x)
Answer C

Id 42
Question Let P (x) denote x spends more than six hours every weekday in class. Then the statement
“No student spends more than 6 hours every weekday in class” is
A ∃ x P (x)
B ∀ x P (x)
C ∃ x ¬P (x)
D ∀ x ¬ P (x)
Answer D

Id 43
Question Let P (x) : x can speak Hindi
Q (x) : x knowns computer language C++
Represent the statement : There is a student at your school who speaks Hindi and
knows C++
A ∃ x (P (x) Λ Q (x))
B ∃ x (P (x) Λ ¬Q (x))
C ∀ x (P (x) V Q (x))
D ∀ x ¬ (P (x) V Q (x))
Answer A

Id 44
Question Let P (x) : x can speak Hindi Q (x) : x knowns computer language C++.
Represent the statement :There is student at your school who speaks Hindi but does not
knows C++
A ∃ x (P (x) Λ Q (x))
B ∃ x (P (x) Λ ¬Q (x))
C ∀ x (P (x) V Q (x))
D ∀ x ¬ (P (x) V Q (x))
Answer B

Id 45
Question Let P (x) : x can speak Hindi. Q (x) : x knowns computer language C++.
Represent the statement :Every student at your school can speak Hindi or knows C++
A ∃ x (P (x) Λ Q (x))
B ∃ x (P (x) Λ ¬Q (x))
C ∀ x (P (x) V Q (x))
D ∀ x ¬ (P (x) V Q (x))
Answer C

Id 46
Question Let P (x) : x can speak Hindi. Q (x) : x knowns computer language C++.
Represent the statement :No student at your school speak Hindi or knows C++
A ∃ x (P (x) Λ Q (x))
B ∃ x (P (x) Λ ¬Q (x))
C ∀ x (P (x) V Q (x))
D ∀ x ¬ (P (x) V Q (x))
Answer D

Id 47
Question Let P (x) : x is perfect. F (x) : x is your friend. Translate the statement into logical
expression using predicates, quantifiers and logical connectives "No one is perfect"
A ∀ x ¬ P (x)
B ¬ ∀ x P (x)
C ∀ x (F (x) → P (x))
D ∃ x (F (x) Λ P (x))
Answer A

Id 48
Question Let P (x) : x is perfect. F (x) : x is your friend. Translate the statement into logical
expression using predicates, quantifiers and logical connectives “Not everyone is perfect”
A ∀ x ¬ P (x)
B ¬ ∀ x P (x)
C ∀ x (F (x) → P (x))
D ∃ x (F (x) Λ P (x))
Answer B

Id 49
Question Let P (x) : x is perfect. F (x) : x is your friend. Translate the statement into logical
expression using predicates, quantifiers and logical connectives “Atleast one of your
friend is perfect”
A ∀ x ¬ P (x)
B ¬ ∀ x P (x)
C ∀ x (F (x) → P (x))
D ∃ x (F (x) Λ P (x))
Answer D

Id 50
Question If P = { a, b, { a, b}, { { a, b}} which of the following statement is false
A { a, b} ∈ P
B { b, { a, b}} ⊆ P
C { a, {b} } ⊆ P
D { a, b } ⊆ P
Answer C

Id 51
Question Let P (x) : x is perfect. F (x) : x is your friend. Translate the statement into logical
expression using predicates, quantifiers and logical connectives “everyone is your friend
and is perfect”
A ∀ x (F (x) → P (x))
B ∀ x (F (x) Λ P (x))
C ∀ x (F (x) V P (x))
D (¬ ∀ x F (x) V ∃ x ¬P (x))
Answer B

Id 52
Question Let P (x) : x is perfect. F (x) : x is your friend. Translate the statement into logical
expression using predicates, quantifiers and logical connectives “Not everybody is your
friend or someone is not perfect.”
A ∀ x (F (x) → P (x))
B ∀ x (F (x) Λ P(x))
C ∀ x (F (x) V P (x))
D (¬ ∀ x F (x) V ∃ x ¬P (x))
Answer D

Id 53
Question A formula equivalent to given formula and consists of sum of elementary products is
called ?
A Conjunctive Normal form
B Disjunctive Normal form
C Principle Disjunctive Normal form
D Principle Conjunctive Normal form
Answer B

Id 54
Question A formula equivalent to given formula and consists of product of elementary sums is
called
A Conjunctive Normal form
B Disjunctive Normal form
C Principle Disjunctive Normal form
D Principle Conjunctive Normal form
Answer A

Id 55
Question For a formula, an equivalent formula consisting of conjunctions of maxterms only is
called
A Conjunctive Normal form
B Disjunctive Normal form
C Principle Disjunctive Normal form
D Principle Conjunctive Normal form
Answer D

Id 56
Question For a formula, an equivalent formula consisting of disjunctions of minterms only is called
A Conjunctive Normal form
B Disjunctive Normal form
C Principle Disjunctive Normal form
D Principle Conjunctive Normal form
Answer C

Id 57
Question The set of natural numbers N is
A { – ∞ , …… – 3, – 2, – 1, 0, 1, 2, ……… ∞}
B {0, 1, 2, 3, ………, ∞ }
C {– ∞, ………, – 3, – 2, – 1}
D {1, 2, 3, …………, ∞}
Answer B

Id 58
Question The set of integers Z is
A { – ∞ , …… – 3, – 2, – 1, 0, 1, 2, ……… ∞}
B {0, 1, 2, 3, ………, ∞ }
C {– ∞, ………, – 3, – 2, – 1}
D (1, 2, 3, …………, ∞}
Answer A

Id 59
Question If and only if ∀ x (x ∈ A ↔ x ∈ B) means
A Set A and B are equal
B Set A and B are disjoint
C Set A is greater than B
D Set B is greater than A
Answer A

Id 60
Question A set of all the subsets of a set is
A subset
B proper subset
C power set
D proper set
Answer C

Id 61
Question A = { a, b, { a, c} , Φ} than A - { b, c} is
A { {a, c} }
B { b, { a, c}, Φ}
C { a, { a, c}, Φ}
D Φ
Answer C

Id 62
Question If B = { Φ, c} than B ∩ P (B) is
A Φ
B c
C P (B)
D {Φ}
Answer D

Id 63
Question If A = { 1, 2, 4, 6, 8} , B = { 2, 4, 5, 9} then A ⊕ B
A {1, 4, 5, 6, 8}
B {1, 5, 6, 8, 9}
C {1, 2, 5, 8, 9}
D {1, 6, 8, 9}
Answer B

Id 64
Question If C is set containing 5 distinct elements then the cardinality of power set of A.
A 32
B 16
C 64
D 128
Answer A

Id 65
Question The set (A –B) – C is equal to the set
A (A –B) ∩ C
B (A ∪ B) – C
C (A – B) ∪ C
D A –(B ∪ C)
Answer D

Id 66
Question A survey of 100 college faculty who exercise regularly found that 45 jog, 30 swim, 20
cycle, 6 jog and swim. 1 jogs and cycles, 5 swim and cycle, and 1 does all three. How
many of the faculty members do not do any of these three activities?
A 12
B 11
C 7
D 16
Answer D
Id 67
Question A survey of 100 college faculty who exercise regularly found that 45 jog, 30 swim, 20
cycle, 6 jog and swim. 1 jogs and cycles, 5 swim and cycle, and 1 does all three. How
many of the faculty members just jog?
A 38
B 39
C 40
D 33
Answer B

Id 68
Question A survey of 100 college faculty who exercise regularly found that 45 jog, 30 swim, 20
cycle, 6 jog and swim. 1 jogs and cycles, 5 swim and cycle, and 1 does all three. How
many of the faculty members just swim?
A 19
B 25
C 24
D 20
Answer D

Id 69
Question A survey of 100 college faculty who exercise regularly found that 45 jog, 30 swim, 20
cycle, 6 jog and swim. 1 jogs and cycles, 5 swim and cycle, and 1 does all three. How
many of the faculty members just cycle?
A 19
B 20
C 15
D 14
Answer C
Id 70
Question Routine physical examinations of 500 pre primary school children revealed that 40 had
dental problems, 45 had vision problems, 55 had hearing problems, 15 had dental and
vision problems, 15 had dental and hearing problems, 20 had vision and hearing
problems, and 10 had dental, vision, and hearing problems. How many of the children had
none of the three kinds of problems?
A 360
B 370
C 390
D 400
Answer D

Id 71
Question Routine physical examinations of 500 pre primary school children revealed that 40 had
dental problems, 45 had vision problems, 55 had hearing problems, 15 had dental and
vision problems, 15 had dental and hearing problems, 20 had vision and hearing
problems, and 10 had dental, vision, and hearing problems. How many of the children had
dental problem only?
A 40
B 30
C 20
D 25
Answer C

Id 72
Question Routine physical examinations of 500 pre primary school children revealed that 40 had
dental problems, 45 had vision problems, 55 had hearing problems, 15 had dental and
vision problems, 15 had dental and hearing problems, 20 had vision and hearing
problems, and 10 had dental, vision, and hearing problems. How many of the children had
at least one problem?
A 120
B 100
C 140
D 130
Answer B
Id 73
Question Routine physical examinations of 500 pre-primary school children revealed that 40 had
dental problems, 45 had vision problems, 55 had hearing problems, 15 had dental and
vision problems, 15 had dental and hearing problems, 20 had vision and hearing
problems, and 10 had dental, vision, and hearing problems. How many of the children had
hearing problem only?
A 55
B 20
C 25
D 30
Answer D

Id 74
Question Routine physical examinations of 500 pre primary school children revealed that 40 had
dental problems, 45 had vision problems, 55 had hearing problems, 15 had dental and
vision problems, 15 had dental and hearing problems, 20 had vision and hearing
problems, and 10 had dental, vision, and hearing problems. How many of the children had
vision problem only?
A 10
B 35
C 20
D 30
Answer C

Id 75
Question In order to prepare a report on agricultural prospects for India, an adviser questions 100
farmers about their crop plans for the year. He finds that 75 intend to plant rice, 55 will
plant sunflower, 35 will plant wheat, 35 will plant rice and sunflower, 25 will plant rice
and wheat, 15 will plant sunflower and wheat, and 10 will plant all three. How many of
the farmers will plant none of them?
A 5
B 10
C 0
D 15
Answer C
Id 76
Question In order to prepare a report on agricultural prospects for India, an adviser questions 100
farmers about their crop plans for the year. He finds that 75 intend to plant rice, 55 will
plant sunflower, 35 will plant wheat, 35 will plant rice and sunflower, 25 will plant rice
and wheat, 15 will plant sunflower and wheat, and 10 will plant all three. How many of
the farmers will plant wheat only?
A 25
B 20
C 30
D 5
Answer D

Id 77
Question In order to prepare a report on agricultural prospects for India, an adviser questions 100
farmers about their crop plans for the year. He finds that 75 intend to plant rice, 55 will
plant sunflower, 35 will plant wheat, 35 will plant rice and sunflower, 25 will plant rice
and wheat, 15 will plant sunflower and wheat, and 10 will plant all three. How many of
the farmers will plant rice only?
A 25
B 35
C 30
D 40
Answer A

Id 78
Question In order to prepare a report on agricultural prospects for India, an adviser questions 100
farmers about their crop plans for the year. He finds that 75 intend to plant rice, 55 will
plant sunflower, 35 will plant wheat, 35 will plant rice and sunflower, 25 will plant rice
and wheat, 15 will plant sunflower and wheat, and 10 will plant all three. How many of
the farmers will plant sunflower only?
A 20
B 15
C 30
D 25
Answer B
Id 79
Question A merchant surveys 200 customers to see how they knew about the sale in the shop. He
found that 115 had seen television ads, 75 had heard radio ads, and 125 had read
newspaper ads. He also found that 30 received information from television and radio, 70
from television and newspapers, 25 from radio and newspapers, and 10 from all three. If
everyone else said they heard it from a friend, how many heard it from a friend?
A 10
B 5
C 15
D 0
Answer D

Id 80
Question A merchant surveys 200 customers to see how they knew about the sale in the shop. He
found that 115 had seen television ads, 75 had heard radio ads, and 125 had read
newspaper ads. He also found that 30 received information from television and radio, 70
from television and newspapers, 25 from radio and newspapers, and 10 from all three.
How many heard about the sale by radio advertisements only?
A 65
B 40
C 35
D 30
Answer D

Id 81
Question A merchant surveys 200 customers to see how they knew about the sale in the shop. He
found that 115 had seen television ads, 75 had heard radio ads, and 125 had read
newspaper ads. He also found that 30 received information from television and radio, 70
from television and newspapers, 25 from radio and newspapers, and 10 from all three.
How many heard about the sale by newspaper advertisements only?
A 115
B 100
C 40
D 65
Answer C
Id 82
Question A merchant surveys 200 customers to see how they knew about the sale in the shop. He
found that 115 had seen television ads, 75 had heard radio ads, and 125 had read
newspaper ads. He also found that 30 received information from television and radio, 70
from television and newspapers, 25 from radio and newspapers, and 10 from all three.
How many heard about the sale by television advertisements only?
A 105
B 95
C 65
D 25
Answer D

Id 83
Question A merchant surveys 200 customers to see how they knew about the sale in the shop. He
found that 115 had seen television ads, 75 had heard radio ads, and 125 had read
newspaper ads. He also found that 30 received information from television and radio, 70
from television and newspapers, 25 from radio and newspapers, and 10 from all three.
How many heard about the sale by at least one type of advertisement?
A 190
B 170
C 180
D 200
Answer D

Id 84
Question A survey of 80 students in a college showed that 36 students took English, 32 took
history,32 took political science, 16 took political science and history, 16 took history and
English, 14 took political science and English, 6 took all three. How many students took
English and neither of the other two?
A 30
B 20
C 28
D 12
Answer D
Id 85
Question A survey of 80 students in a college showed that 36 students took English, 32 took
history,32 took political science, 16 took political science and history, 16 took history and
English, 14 took political science and English, 6 took all three. How many students took
non of the three courses?
A 30
B 20
C 40
D 50
Answer D

Id 86
Question A survey of 80 students in a college showed that 36 students took English, 32 took
history,32 took political science, 16 took political science and history, 16 took history and
English, 14 took political science and English, 6 took all three. How many students took
History but neither of the other two?
A 20
B 14
C 10
D 6
Answer D

Id 87
Question A survey of 80 students in a college showed that 36 students took English, 32 took
history,32 took political science, 16 took political science and history, 16 took history and
English, 14 took political science and English, 6 took all three. How many students took
Political science but neither of the other two?
A 22
B 16
C 10
D 8
Answer D
Id 88
Question In a group of 12 students,4 are wearing white T-shirts and 10 are wearing black shorts.If
all your team mates are required to wear one or the other, how many are wearing both?

A 4
B 6
C 8
D 2
Answer D

Id 89
Question In a restaurant 40 customers ordered fries, 13 customers put salt on their fries, 28
customers put ketch up on their fries, 6 put both, how many eat their fries plain?
A 8
B 5
C 6
D 7
Answer B

Id 90
Question You have 5 small blue marbles, 8 small green marbles, 3 large blue marbles and 17
marbles in total, how many large green marbles do you have?
A 9
B 11
C 1
D 8
Answer C

Id 91
Question There are 12 houses on a road, 7 are painted white and 3 are painted with white and red
color. How many are painted with only red colour if only white and red color are used for
painting the houses?
A 2
B 5
C 9
D 10
Answer B
Id 92
Question A survey of 70 high school students revealed that 35 like folk music. 15 like classical
music and 5 like both. How many of the students surveyed do not like either folk or
classical music?
A 15
B 20
C 25
D 50
Answer C

Id 93
Question A survey of 80 high college students revealed that 40 like pop music. 20 like classical
music and 10 like both. How many of the students surveyed like pop music only?
A 60
B 50
C 40
D 30
Answer D

Id 94
Question A survey of 80 high school students revealed that 40 like folk music. 20 like classical
music and 10 like both. How many of the students surveyed do not like either folk or
classical music?
A 10
B 20
C 30
D 40
Answer C

Id 95
Question In a survey conducted for 2000 people 1750 drank tea, 820 drank coffee and while 625
drank both. Then number of people who drank neither is
A 65
B 55
C 45
D 60
Answer B

Id 96
Question 1.If A and B are disjoint sets then | A –B | is equal to

A | B – A|
B | A|
C |A | –| B |
D Φ
Answer B

Id 97
Question If A = { 1, 2, 3, ……, 9, 10}, B = {1 , 2, 4, 8}, C = {1, 2, 3, 5, 7}, D = { 2, 4, 6, 8}
then (B –C) –D is
A {4, 8}
B Φ
C {8}
D {4}
Answer B

Id 98
Question A ⊕ B is set equal to
A A–A∩ B
B (A –B) ∩ (B –A)
C (A ∪ B) – (A ∩ B)
D A∩ B –A
Answer C

Id 99
Question p Λ q is T when
A p is T, q is F
B p is F, q is T.
C p is T, q is T
D p is F, q is F
Answer C

Id 100
Question ¬p V q is F when
A p is T q is F
B p is F, q is T.
C p is T, q is T
D p is F, q is F
Answer A

Id 101
Question p V ¬q is F when
A p is T q is F
B p is F, q is T.
C p is T, q is T
D p is F, q is F
Answer B

Id 102
Question ¬ (p V q) is equivalent to
A ¬p V ¬q
B ¬p Λ q
C ¬p Λ ¬q
D p Λ ¬q
Answer C

Id 103
Question p Λ ¬p is logically equivalent to
A Tautology
B p
C ¬p
D contradiction
Answer D

Id 104
Question p V ¬p is logically equivalent to
A Tautology
B p
C ¬p
D contradiction
Answer A

Id 105
Question p V p is logically equivalent to
A Tautology
B p
C ¬p
D contradiction
Answer B

Id 106
Question Let p : It is below freezing ; q : it is snowing
Then represent : It is below freezing and snowing.
A pΛq
B p Λ ¬q
C ¬p Λ ¬q
D pVq
Answer A

Id 107
Question Let p : It is below freezing ;
q : it is snowing
Then represent :It is below freezing but not snowing.
A pΛq
B p Λ ¬q
C ¬p Λ ¬q
D pVq
Answer B

Id 108
Question Let p : It is below freezing ;
q : it is snowing
Then represent :It is not below freezing and not snowing
A pΛq
B p Λ ¬q
C ¬p Λ ¬q
D pVq
Answer C

Id 109
Question Let p : It is below freezing ;
q : it is snowing
Then represent :It is either snowing or below freezing or both
A pΛq
B p Λ ¬q
C ¬p Λ ¬q
D pVq
Answer D

Id 110
Question p : I will be happy
q : I pass the exam.
Identify : I will be happy only if I pass the exam.

A pΛq
B p →q
C q →p
D pVq
Answer B

Id 111
Question If q → ¬p is F then,

A p is T, q is T
B p is T q is F

C p is F q is T
D q is f, p is F
Answer A

Id 112
Question Let p : It is below freezing ;
q : it is snowing
Then represent :If it is below freezing, then it is also snowing.
A p →q
B (p V ¬q) Λ ( p → ¬q)
C q↔p
D q →p
Answer A

Id 113
Question Let p : It is below freezing ;
q : it is snowing
Then represent :It is either below freezing or snowing, but it is not snowing if it is below
freezing
A p →q
B (p V ¬q) Λ ( p → ¬q)
C q↔p
D q →p
Answer B

Id 114
Question Let p : It is below freezing ;
q : it is snowing;
Then represent :It is below freezing is necessary and sufficient condition for it to be
snowing.
A p →q
B (p V ¬q) Λ ( p → ¬q)
C q↔p
D q →p
Answer C

Id 115
Question A proof that begins by asserting a claim and proceeds to show that the claim cannot be
true is by
A Induction;
B construction;
C contradiction;
D prevarication;
Answer C

Id 116
Question Induction is a
A Algorithm
B Program
C Proof Method
D Procedure
Answer C

Id 117
Question The induction principle makes assertions about
A Infinite sets
B Large finite sets
C Small finite sets
D Logical formulas
Answer A

Id 118
Question In an inductive proof, showing that P(x) implies P(x + 1) is
A The base step
B The inductive step
C Sufficient to prove P(x) for some x
D Sufficient to prove P(x) for all x
Answer B

Id 119
Question Which of the following statement is the negation of the statement , “2 is even and –3 is
negative”
A 2 is even and –3 is not negative
B 2 is odd and –3 is not negative
C 2 is even or –3 is not negative
D 2 is even or –3 is not negative
Answer D

Id 120
Question ∩ denotes
A Set membership
B Intersection
C Conjunction
D Negation
Answer B

Id 121
Question {} is a subset of
A Itself
B No set
C All set
D Only infinite set
Answer C

Id 122
Question Following are two sentences. A:2+3=5 B: Read this carefully
Which of the following is correct
A A and B both are proposition
B A is proposition but B is not
C B is proposition but A is not
D Both A and B are not proposition
Answer B

Id 123
Question p: Today is Sunday q: Today is holiday contrapositive of “ Today is Sunday hence it is
holiday is”
A If today is not holiday then it is not Sunday
B If today is not Sunday then it is not holiday
C If today is holiday then it is Sunday
D Today is Sunday hence it is holiday
Answer A
Id 124
Question The description of the shaded region in the following figure using the
operations on set is

A C∪(A ∩ B)
B (C − ((A ∩C)∪(C∩B)))∪(A ∩B)
C (C − (A ∩C)∪(C∩ B))∪(A ∩B)
D A ∪ B∪C − (C∪(A ∩B)
Answer B

Id 125
Question If A and B are two subsets of a universal set then A-B IS equivalent to
A A ∩Β
B B–A
C A UΒ
D A
Answer A

Id 126
Question Consider a set S of integers from 1 to 250. A denotes the set of integers divisible by 3,B denotes
the set of integers divisible by 5 and C denotes the set of integers divisible by 7 then |A| is
A 125
B 50
C 83
D 35
Answer C

Id 127
Question Consider a set S of integers from 1 to 250. A denotes the set of integers divisible by 3,B denotes
the set of integers divisible by 5 and C denotes the set of integers divisible by 7 then |A ∩ C|
A 16
B 11
C 07
D 35
Answer B

Id 128
Question Number of elements divisible by 3 or 5 but not by 7

A 135
B 100
C 35
D 117
Answer B

Id 129
Question If 'p' stands for 'I run fast' and 'q' stands for 'I shall win', then symbolic form of ,'I do not run fast'
A p
B ~p
C q
D ~p
Answer B

Id 130
Question V denotes
A Set membership
B Or
C And
D Relation between Sets
Answer B

Id 131
Question Ø denotes
A Set membership
B Empty set
C Conjunction
D Negation
Answer B

Id 132
Question If A, B, C be three sets such that A ∪ B = A ∪ C and A ∩ B = A ∩ C, then.
A A=B
B A=B=C
C B=C
D A=C
Answer C

Id 133
Question The union of two sets A & B is the set containing of all elements which are in A, or in B, or in
both sets A & B.

A True
B False
C
D
Answer A

Id 134
Question The intersection of two sets A & B is the set consisting of elements which are in A as well
as in B.
A True
B False
C
D
Answer A

Id 135
Question ~A=U-A
A True
B False
C
D
Answer A

Id 136
Question A – B = A ∩ ~B
A True
B False
C
D
Answer A

Id 137
Question A symmetric difference of A with B = (A – B ) U (B – A )
A True
B False
C
D
Answer A

Id 138
Question A symmetric difference with B = (A – B ) ∩ (B – A )
A True
B False
C
D
Answer B

Id 139
Question De Morgan’s law state that
A ~(AUB)=~A∩ ~B
B (AUB)=(BUA)
C ~(A∩B)=~AU ~B
D Both A & C
Answer D

Id 140
Question The set having no element is called
A Empty set
B Null set
C Void set
D All of the above
Answer D

Id 141
Question For any three non empty sets A, B, C |AUBUC|= ____________
A |A|+ |B|+|C|+ |A∩B|+|A∩C|+|B∩C|+|A∩B∩C|
B |A|+ |B|+|C|- |A∩B|-|A∩C|-|B∩C|-|A∩B∩C|
C |A|+ |B|+|C|- |A∩B|-|A∩C|-|B∩C|+|A∩B∩C|
D |A|+ |B|+|C|
Answer C

Id 142
Question If A= {1,2,3,4}, B={4,5,6,7 } then A-B is ______
A {1,2,3,4,5,6,7}
B {5,6,7}
C {1,2,3}
D {4}
Answer C

Id 143
Question If A= {1,2,3,4}, B={4,5,6,7 } then B-A is ______
A {1,2,3,4,5,6,7}
B {5,6,7}
C {1,2,3}
D {4}
Answer B

Id 144
Question If A= {1,2,3,4}, B={4,5,6,7 } then AUB is ______
A {1,2,3,4,5,6,7}
B {5,6,7}
C {1,2,3}
D {4}
Answer A

Id 145
Question A, B, C are finite sets with |A|=6, |B|=8 , |C|=6, |AU B U C|=11, |A∩B|=3, |A∩ C|=2, and
|B∩C|=5. Then |A∩B∩C|= ?
A 0
B 1
C 2
D 3
Answer B
Id 1
Question Let A={1, 2, 3} B={2, 4, 6} then the relation R = {(a,b) | b = 2a} is
A {(2,1), (4,2), (6,3)}
B {(1,1), (2,2), (3,3)}
C {(1,2), (2,4), (3,6)}
D {(1,2), (2,4), (3,8)}
Answer C

Id 2
Question If set A={1,2,3,4,5} and R on A is {(a,b) | b = a +1}, then what is R-1 ?
A {(1,1), (2,2), (3,3), (4,4), (5,5)}
B {(2, 1),(3, 2),(4, 3),(5, 4)}
C {(1,2),(2,3),(3,4),(4,5)}
D {(2, 3),(3, 2),(4, 3),(5, 6)}
Answer B

Id 3
Question If set A={1,2,3,4,5} and a relation R is defined on A as xRy iff y = x + 1, then R2 is
A {(1,3),(2,4),(2,5)}
B {(1,3),(2,4),(3,5)}
C {(1,4),(2,5)}
D {(1,3),(2,4),(2,5)}
Answer B

Id 4
Question Let A={1,2,3,4,}, B={a,b,c} and a relation R={(1,a),(1,b),(2,b),(2,c),(3,b),(4,a)} then Rc
is
A {(1,c),(2,a),(3,a),(3,c),(4,b),(4,c)}
B {(1,a),(1,b),(2,a),(2,b),(3,a),(3,c)}
C {(2,a),(2,b),(2,c),(3,a),(3,b),(4,c)}
D {(2,a),(2,b),(2,c),(3,c),(3,b),(4,c)}
Answer A
Id 5
Question Let A={1,2,3,4} and R={(1,1),(1,2),(2,3),(3,4)} ; S={(3,1),(4,4),(2,4),(1,4)} be two
relations on A, then the relation (SoR) is
A {(1,4),(2,1),(3,4)}
B {(3,1),(3,2)}
C {(1,4),(2,4),(3,4),(4,4)}
D {(1,4),(2,3),(3,4),(4,4)}
Answer A

Id 6
Question Which of these collections of subsets is not a partition of {1,2,3,4,5,6}?
A {1},{2,3,6},{4},{5}
B {1,4,5},{2,3,6}
C {2,4,6},{1,3,5}
D {1,2},{2,3,4},{4,5,6}
Answer D

Id 7
Question Let A={1,2,3,4} and R={(1,1), (1,2), (2,1), (2,2), (3,4), (4,3), (3,3), (4,4)} be a relation on
A then R is
A Reflexive but not symmetric
B Symmetric but not Reflexive
C Transitive but not symmetric
D Equivalence relation
Answer D

Id 8
Question Let A={1,2,3,4} and B={a,b,c}. Let S be a relation from A to B defined by S={(1,a),(2,b),
(2,c), (3,c)} is
A One to one function
B On-to function
C One to many function
D Not a function
Answer D
Id 9
Question If A={3,4} and B={5,-5}, which of the following is a function from A to B?
A {(4,5), (4,-5), (3,5)}
B {(4,5), (4,-5)}
C {(3,5), (4,-5)}
D {(5,3), (-5,4)}
Answer C

Id 10
Question Let R={(1,2),(3,4),(2,2)} and S={(4,2),(2,5),(3,1),(1,3)} be relations on a set
A={1,2,3,4,5}, then So(RoS) is
A {(3,4),(1,2)}
B {(1,5),(3,2),(2,5)}
C {(4,5),(3,5),(1,2)}
D {(4,5),(3,5),(1,3)}
Answer C

Id 11
Question If A={ a :1 ≤ a ≤ 2} and B = {b: 0 ≤ b ≤ 1 } , where a , b∈Z (set of integers) then
what is A× B ?
A {(0,1), (1,2)}
B {(0,1), (0,2), (1,1), (1,2)}
C {(1,0), (1,1), (2,1), (2,2)}
D {(1,0), (2,1)}
Answer B

Id 12
Question If A={ 2,3} and B = {3,4,5,6 } and R is relation from A to B defined as (a , b)∈ R if
"a divides b".Then R is equal to
A {(2,4),(2,6),(3,3),(3,6)}
B {(6,2),(6,4),(6,3)}
C {(2,6),(3,6)}
D {(4,2),(6,2),(3,3),(6,3)}
Answer A
Id 13
Question If A={ 3,4,5} and R is a relation on A defined as aRb iff a < b, then R is equal to
A {(3,4),(3,5)}
B {(4,3),(4,5)}
C {(3,4),(3,5),(4,5)}
D {(3,4),(3,5),(4,4),(4,5)}
Answer C

Id 14
Question If A={ 1,2,3,4}, B = {a,b,c } and R is a relation from A to B defined as R={(1,a),(3,a),
(3,c)}, then inverse of R is equal to
A {(3,a), (2,c), (3,b)}
B {(1,c), (2,b), (2,c), (3,b)}
C {(a,1),(a,3),(c,3)}
D {(a,4),(a,2),(c,3)}
Answer C

Id 15
Question What is the minimum number of students needed in a class to be sure that at least 6 to get
the same grade (assume that 5 grades are possible)?
A 22
B 24
C 26
D 28
Answer C

Id 16
Question What’s the minimum number of students, each of whom comes from one of the 50
countries must be enrolled in a university to guarantee that there are at least 100 who
come from the same country?
A 4981
B 4951
C 5149
D 1459
Answer B
Id 17
Question If 100 people are in a room, what is the minimum number of people born on the same
month ?
A 9
B 10
C 8
D 7
Answer A

Id 18
Question If R is relation on a set A and if (a ,b)∈ R →(b ,a)∈R , where a , b∈ A , then R is
A Reflexive relation
B Antisymmetric relation
C Symmetric relation
D Transitive relation
Answer C

Id 19
Question If R is relation on a set A and if (a ,b) ,(b , c)∈R →(a , c)∈R , where a , b , c∈ A ,
then R is
A Symmetric relation
B Antisymmetric relation
C Reflexive relation
D Transitive relation
Answer D

Id 20
Question If R is relation on a set A and if (a ,b) ,(b , a)∈R → a=b , where a , b∈ A then R is
A Symmetric relation
B Antisymmetric relation
C Reflexive relation
D Transitive relation
Answer B
Id 21
Question If a relation R is an equivalence relation, then it is
A Transitive and antisymmetric
B Reflexive and antisymmetric relation
C Symmetric and irreflexive relation
D Reflexive ,symmetric and transitive
Answer D

Id 22
Question A relation ‘R’ on a set ‘A’ is called partial order relation if R is
A Reflexive and symmetric relation
B Transitive and symmetric relation
C Reflexive ,antisymmetric and transitive
D Irreflexive and symmetric
Answer C

Id 23
Question If R is a relation defined on a set A, then the transitive closure of R is
A Smallest transitive relation containing R
B Smallest reflexive relation containing R
C Smallest symmetric relation containing R
D None of these
Answer A

Id 24
Question If (A , R) is a 'poset' with a partial order relation R , then any subset of A in which every
pair of elements are related , is called
A Upper bound
B Chain
C Anti-Chain
D Lower bound
Answer B
Id 25
Question If (A , R ) is a 'poset' with a partial order relation R , then any subset of A in which no two
elements in the subset are related , is called
A Upper bound
B Chain
C Anti-Chain
D Lower bound
Answer C

Id 26
Question If A={ a,b} and R is a relation on A where R={(a,a),(a,b),(b,b)}. Then R is a
A Equivalence relation
B Partial order relation
C Symmetric relation
D Tolerance relation
Answer B

Id 27
Question If R is a relation on a set of all strings of 0's and 1's such that R={(a,b): a and b are strings
having same number of zeros}; then R is
A Antisymmetric relation
B Symmetric relation
C Partial order relation
D Asymmetric relation
Answer B

Id 28
Question Consider the relation R defined on the set Z (integers) as R={(x,y): x ≤ y}. Then R is
A Symmetric relation
B Antisymmetric relation
C Equivalence relation
D None of these
Answer B
Id 29
Question If L is a set of lines in a plane and R is a relation on L defined as R={(a,b): a is
perpendicular to b }. Then R is
A Reflexive relation
B Equivalence relation
C Transitive relation
D Symmetric relation
Answer D

Id 30
Question If R is an equivalence relation on the set A ={1, 2, 3}defined as R={(1,1),(1,2),(2,1),(2,2),
(3,3)}, then the equivalence class of 2 is
A {1}
B {1,2}
C {3}
D {1,2,3}
Answer B

Id 31
Question If A = {5,6,7,8} and R is an equivalence relation defined on the A as R={(5,5),(6,6),(7,7),
(7,8),(8,7),(8,8)}; then the equivalence class of 7 is
A {7}
B {8}
C {5,6}
D {7,8}
Answer D

Id 32
Question If two functions f and g are defined as f (x) = x + 2 and g(x) = x − 2 , then the composite
function gof is given by
A x−2
B x+2
C x
D x+4
Answer C
Id 33
Question If function f and g are defined as f (x)=2x+3 and g(x)=3x+4 , then composite function gof
is given by
A 6x + 11
B 6x + 13
C 7x + 5
D 7x + 6
Answer B

Id 34
Question If a function f: R→R is defined on the set of 'Real' numbers (R) as f(x) = 2x, then
A f is injective and surjective
B f is not injective but surjective
C f is injective but not surjective
D None of these
Answer A

Id 35
Question Two functions f and g are defined on a set X={1,2,3} as f ={(1,2)(2,3),(3,1)} and g =
{(1,2),(2,1),(3,3)}, then fog is:
A {(2,1),(2,3),(3,1)}
B {(1,3),(3,1),(2,2)}
C {(2,2)}
D {(1,3),(2,2)}
Answer B

Id 36
Question If A=B= {1,2,3,4} and f:A→B given by f={(1,1),(2,3),(3,4),(4,2)} then f is
A one-one ,but not onto function
B one-one and onto function
C onto ,but not one-one function
D neither one-one ,nor onto function
Answer B
Id 37
Question If set A={1,2,3,4,5} and a relation R on A is defined as xRy iff y = x +1; then R-1 is
A {(1,1),(2,2),(3,3),(4,4),(5,5)}
B {(1,2),(2,3),(3,4),(4,5)}
C {(2,1),(3,2),(4,3),(5,4)}
D None of these
Answer C

Id 38
Question Let A={1,2,3,4} and R={(1,2), (2,3), (3,4), (2,1)}, then the transitive closure of R is
A {(1,1), (1,2),(1,3),(1,4) (2,1),(2,2),(2,3),(2,4),(3,4)}
B {(1,2),(1,3),(1,4) (2,1),(2,2),(2,3)}
C {(1,1),(1,3),(2,4),(3,2)}
D None of these
Answer D

Id 39
Question Given A={p, q, r, s} and B={1, 2, 3} which of the following relations from A to B is not a
function?
A {(p,1),(q,2),(r,1),(s,2)}
B {(p,1),(q,1),(r,1),(s,1)}
C {(p,2),(q,3),(r,2),(s,2)}
D {(p,1),(q,2),(p,2),(s,3)}
Answer D

Id 40
Question Consider the relation “a divides b” on A = {1,2,3,6,12,18}. What are the immediate
predecessors of the element 6?
A 12 and 18
B 1 and 2
C 1 and 3
D 2 and 3
Answer D
Id 41
Question Is the following Hasse diagram a lattice?
e

C 11111 d
b 111

A No
B Yes
C Both options A and B are correct
D None of the above
Answer B

Id 42
Question Let A={1, 2, 5, 7, 10, 14, 35, 70} and R be a binary relation such that (a, b) Î R if ‘b’ is
divisible by ‘a’; then which of the following statement is correct?
A (A,R) is not a lattice
B (A,R) is a lattice
C Both options A and B are correct
D Both options A and B are wrong
Answer B

Id 43
Question Is the following Hasse diagram a lattice?
70

35

A No
B Yes
C Both options A and B are correct
D None of the above
Answer B

Id 44
Question If S={1,3,5,15,30} and aRb iff 'b is divisible by a', then chain(s) of S is (are)
A {1,3,5,15}
B {1,3 15,30}
C {1,5,15,30}
D Both (B) and (C)
Answer D

Id 45
Question A Lattice is a poset (B, R) in which every subset {a,b} of set B has
A A least upper bound
B A greatest lower bound
C Both options A and B
D None of these
Answer C

Id 46
Question If A={1,2,3,4,6} and aRb iff 'b is divisible by a', then the relation R is
A {(1,2),(2,4),(3,6)}
B {(1,1),(1,2),(1,3),(1,4),(1,6),(2,4),(2,6),(3,6)}
C {(1,1),(2,2),(2,4),(2,6),(3,6)}
D None of these
Answer D

Id 47
Question The relation { (1,2), (1,3), (3,1), (1,1), (3,3), (3,2), (1,4), (4,2), (3,4)} is
A Reflexive
B Transitive
C Symmetric
D Asymmetric
Answer B

Id 48
Question If R is a relation “less than” from A = {1,2,3,4} to B = {1,3,5} then RoR-1 is

A {(3,3), (3,4), (3,5)}


B {(3,1), (5,1), (3,2), (5,2), (5,3), (5,4)}
C {(3,3), (3,5), (5,3), (5,5)}
D {(1,3), (1,5), (2,3), (2,5), (3,5), (4,5)}
Answer C

Id 49
Question Let R = { ( 3, 3 ) ( 6, 6 ) ( ( 9, 9 ) ( 12, 12 ), ( 6, 12 ) ( 3, 9 ) ( 3, 12 ), ( 3, 6 ) } be a relation
on the set A = { 3, 6, 9, 12 }. The relation is
A Reflexive and transitive
B Reflexive only
C An equivalence relation
D Reflexive and Symmetric only
Answer A

Id 50
Question Let R = { (1, 3 ), (4, 2), (2, 4), (2, 3), (3, 1) } be a relation on the set A = { 1, 2, 3,4 }. The
relation R is
A Asymmetric
B Not symmetric
C Transitive
D Reflexive
Answer B

Id 51
Question Find the range of the function f(x) = 2x2, if the domain is {-2, -1, 0, 3, 4}
A {-4,-2,0,6,8}
B {8,2,0,18,32}
C {-8, -2, 0,18,32}
D None of these
Answer B
Id 52
Question If A={a,b,c} and a relation R on A is defined by R={(a,b),(b,a),(a,a),(b,b)}; then R is
A Reflexive and symmetric
B Antisymmetric and transitive
C Reflexive and transitive
D Symmetric and transitive
Answer D
Marks 2
Unit 2

Id 53
Question If A = {1,2,3,4,5} and R on A is defined by R={(a,b) | b – a = 1}, then
A R={(1,2),(2,3),(3,4),(4,5)}
B R={(2,1),(3,2),(4,3),(5,4)}
C R={(1,2),(2,3),(3,4),(4,5), (2,1),(3,2),(4,3),(5,4)}
D None of these
Answer A

Id 54
Question If A={2,3,5,6,10,15,30} and aRb iff 'b is divisible by a', then minimal elements of A are
A 2 and 3
B 3 and 5
C 2 and 5
D 2, 3 and 5
Answer D

Id 55
Question If A={2,3,5,6,10,15,30} and aRb iff a|b (a divides b) then maximal element(s) of A are
A 15 and 30
B 10 and 30
C Only 30
D None of these
Answer C
Id 56
Question If A={2,3,5,6,10,15,30,45} and aRb iff a|b (a divides b) then upper bound of 2 and 3 are
A 10 and 15
B 6 and 30
C 10 and 30
D 30 and 45
Answer B

Id 57
Question If A={2,3,5,6,10,15,30,45} and aRb iff a|b (a divides b) then the greatest lower bound of
30 and 45 is
A 10 and 15
B Only 15
C Only 30
D 15 and 30
Answer B

Id 58
Question If A={2,3,5,6,10,15,30,45} and aRb iff a|b (a divides b) then lower bound of 30 and 45
are
A 3
B 5
C 15
D All of these
Answer D

Id 59
Question If A={1,2,3,4,5,6} and R on A is {(1,3), (3,1), (1,5), (5,1), (6,4), (4,6), (5,3), (3,5), (2,6),
(6,2), (1,1), (2,2), (3,3), (4,4), (5,5), (6,6)} then equivalence class of 6 and 5 are
A {4,2,3} and{1,5,4}
B {4,2,6} and {1,3,5}
C {2 6 5} and {3,1,5}
D {2 6 3} and {3,1,6}
Answer B
Id 60
Question If A={1,2,3,4} and B={a,b,c} and R={(1,a),(3,a),(3,c)} then domain of R-1 is
A {a,c}
B {a,b,c}
C {1,3}
D {b,c}
Answer A

Id 61
Question If A={a,b,c,d} and R={(a,a),(a,b),(b,d)} then R2 is
A {(a,a),(a,b),(b,d)}
B {(a,a),(b,d),(a,d),(a,b)}
C {(a,a),(b,b),(d,d)}
D None of these
Answer A

Id 62
Question Let A={1,2,3,5} and aRb iff a|b (a divides b) then (A,R) is a poset. The anti-chains are
A {2,3},{3,5},{1,5}
B {3,5},{2,5},{1,3}
C {3,5},{1,5},{1,3}
D {2,3),{2,5},{3,5}
Answer D

Id 63
Question Let two functions f and g be defined by f(x) = 2x + 1 and g(x) = x2 – 2 , then gof(4) is
A 78
B 79
C 29
D 30
Answer B
Id 64
Question Let two functions f and g be defined by f(x) = 2x + 1 and g(x) = x2 – 2 , then fog(4) is
A 79
B 80
C 29
D 30
Answer C

Id 65
Question Let functions f and g be defined by f(x) = x + 2 and g(x) = 3x , then gof is
A 3x+6
B 3x+8
C 3x+9
D None of these
Answer A

Id 66
Question An equivalence class of an element a is denoted as
A [a]
B (a)
C {a}
D None
Answer A

Id 67
Question Find the domain for the relation: {(1,2), (5,3), (3,6),(2,4)}

A {1,2,3,5}
B {2,3,4,6}
C {1,3,4,6}
D None
Answer A
Id 68
Question If f is a function from set A to set B then which is true ?
A A is known as domain set
B A is known as range set
C A is known as master set
D None
Answer A

Id 69
Question Which statement is true?
A Every relation is a function
B Every function is a relation
C Both A & B
D None of these
Answer B

Id 70
Question which of the statement is true?
A A relation can be of the type one to many
B A function can be of the type one to many
C Both A and B
D None of these
Answer A

Id 71
Question If a relation R is symmetric and transitive, then it is called
A Equivalence relation
B Tolerance relation
C Poset
D None of these
Answer B
Id 72

Question R={(1,1),(1,2),(2,1),(2,2),(3,3),(3,4),(4,3),(4,4)} Determine whether the relation is


reflexive,symmetric and transitive?
A Reflexive and tranistive
B Reflexive and symmetric
C Reflexive ,Symmetric and transitive
D Symmetric and transitive
Answer C

Id 73
Question If S = {1,2,3,4,5,6,7,8,9} Find valid partition
A {{1,3,5},{2,6},{4,8,9}}
B {{1,3,5},{2,6,7},{4,8,9}}
C {{1,3},{5,2,6},{4,8}}
D {{1,3},{4,5},{6,7,8,9}}
Answer B

Id 74
Question If number of elements in sets A and B are m and n receptively, then the number of
elements in A X B is
A 2m+n
B 2mn
C m+n
D m.n
Answer D
Id 75
Question A={1,2,3,4} , R={(1,1),(1,2),(2,1),(2,2),(3,1),(3,3),(1,3),(4,1),(4,4)} Determine whether
the relation R on the set A is equivalence relation
A It is not symmetric so not an equivalence relation .
B It is an equivalence relation.
C It is not transitive and symmetric so not an equivalence relation.
D It is not reflexive,symmetric and transitive so not an equivalence relation.
Answer B
Marks 2
Unit 2

Id 76
Question Define an equivalence relation R on the positive integers A = {2, 3, 4, . . . , 20} by m R n
if the largest prime divisor of m is the same as the largest prime divisor of n. The
number of equivalence classes of R is
A 8
B 9
C 10
D none
Answer A

Id 77
Question Identify the property of Lattice .
A a∨(a∨b) =a

B a∧(a∧b)=b

C a∨(a∧b) =a
D a∧(a∨b)=b
Answer C
Id 79
Question Which of the following is true

A Every relation is function


B Every function is relation
C Every equivalence relation not partial order relation
D Every one-one function has its inverse
Answer B

Id 80
Question If R is a relation on AXA where A is a set of natural numbers such that <a,b>R<c,d> if
a+d=b+c then
A R is partial order relation
B R is equivalence relation
C R is antisymmetric
D R is irreflexive
Answer B

Id 81
Question The binary relation R = {(0, 0),(1, 1)} on A = {0, 1, 2, 3, } is
A Reflexive, Not Symmetric, Transitive
B Not Reflexive, Symmetric, Transitive
C Reflexive, Symmetric, Not Transitive
D Reflexive, Not Symmetric, Not Transitive
Answer B
Id 82
Question A relation is not a
A set of ordered pairs
B set of numbers
C su8bset of a Cartesian product
D way to express how two sets are related
Answer B
Id 83
Question Consider the divides relation, m | n, on the set A = {2, 3, 4, 5, 6, 7, 8, 9, 10}. The
cardinality of the covering relation for this partial order relation (i.e., the number of edges
in the Hasse diagram) is
A 4
B 5
C 6
D 7
Answer D
Id 84
Question R is a relation defined in Z by aRb if and only if ab ≥ 0 then R is
A Reflexive
B Symmetric
C Transitive
D Equivalence relation
Answer D

Id 85
Question Let R be an equivalence relation defined in A. Let п be a set of equivalence classes of A
with respect to the relation R then [a] =
A {x : xϵA and (x,a) ϵ R}
B {x : xϵA and (a,x) ϵ R}
C {x : xϵA and (x,x) ϵ R}
D All of these
Answer A

Id 86
Question

Consider the Hasse diagram for(P, ≤ ) where A=(1,2,3,4,6,24,36,72) what does the
meaning of ≤ for the given relation a ≤ b
A a divides b
B b divides a
C a=b
D None of these
Answer A
Id 87
Question In the following diagram identify it is Lattice or not ?
£

c • ~ - - - - - -• d

c
\.~ .
~ ./ b
a

A It is not a lattice.
B Lub doesnot exist.
C Glb exists and lub doesnot exist.
D It is lattice .
Answer D

Id 88
Question The relation on set A ={1,2,3} is given as R={(1,2),(1,3)} what is the converse of a given
relation R
A R={(1,1),(1,3)}
B R={(2,1,),(3,1)}
C R={(1,2),(3,3)}
D R={(2,1),(2,3),(3,1),(3,2)}
Answer B

Id 89
Question Let f: A→B. If two or more elements have the same image in B,then f is said to be
A Many to one
B Injective
C Surjective
D Bijective
Answer A
Id 90
Question Let A ={1,2,3} and B ={a,b,c,d}.The function f:A→B is defined below
f= {(1,a),(2,a),(3,d)} then the f is
A injective
B surjective
C bijective
D None of these
Answer D

Id 91
Question Select the property of an inverse function.
A Only bijective functions have inverse
B If function A→B is bijective then inverse of function B→A
C If function A→B is bijective then inverse of function is unique.
D All of these
Answer D

Id 92
Question Check whether the following two graphs are isomorphic or not?
A The graphs are isomorphic
B The graphs are different in number of edges and nodes
C The graphs are not isomorphic
D None of these
Answer A

Id 93
Question Let A=({a,b,c} then the relation R={(a,a),(b,b),(c,c)} is
A antisymmetric
B transitive
C Reflexive
D None of these
Answer C
Id 94
Question Let R = { ( 3, 3 ) ( 6, 6 ) ( ( 9, 9 ) ( 12, 12 ), ( 6, 12 ) ( 3, 9 ) ( 3, 12 ), ( 3, 6 ) } be a relation
on the set A = { 3, 6, 9, 12 }. The relation is
A reflexive and transitive
B reflexive only
C an equivalence relation
D reflexive and symmetric only
Answer A
Id 95
Question The relation R defined on the set A = {1, 2, 3, 4, 5} by R = {(x, y) : | x2 – y2| < 16} is
given by
A {(1, 1), (2, 1), (3, 1), (4, 1), (2, 3)}

B {(2, 2), (3, 2), (4, 2), (2, 4)}

C {(3, 3), (4, 3), (5, 4), (3, 4)}

D None of the above

Answer D

Id 96
Question If seven numbers from 1 to 12 are chosen,then two of them will add up to 13.
A It uses Pigeonhole principle
B It uses extended Pigeonhole principle
C It uses Pigeonhole principle and Extended Pigeonhole principle
D None of these
Answer A

Id 97
Question (A ∩ B) Χ (C ∩ D) =

A (A ∩ C) Χ (B ∩ D)

B (A ∩ A) Χ (B ∩ D)

C (A Χ C) ∩ (B X D)

D (A Χ B) ∩ (B X D)

Answer C
Id 98
Question Let A = {1,2,3,4} and B = {a,b,c}. Let R = {(1,a),(1,b),(2,b),(2,c),(3,b),(4,a)} what is
R∼ 1 .
A {(1,c),(1,b),(1,c),(c,2),(b,3),(a,4)}
B {(a,1),(b,1),(b,2) ,(c,2),(b,3),(a,4)}
C {(a,1),(b,1),(b,2) ,(c,2),(b,3),(a,4)}
D {(a,1),(b,1),(b,2),(b,3),(a,4)}
Answer B

Id 99
Question A function is one to one and onto if
A Every element in domain is having atleast one image.
B Every element in domain is not necessarily having an image.
C Every element in domain must have one to one correspondence to co-domain and every
co-domain element is mapped to element in domain .
D None of these
Answer C
Id 1
Question If G is an undirected planer graph on n vertices with e edges then ?
A
e<=n
B e<=2n
C e<=3n
D None of these

Answer B
Id 2
Question Which of the following statement is false ?
A
G is connected and is circuitless
B G is connected and has n edges
C G is minimally connected graph
D G is circuitless and has n-1 edges

Answer B
Marks 1
Unit 4
Id 3
Question A tour of G is a closed walk of graph G which includes every edge G at least once. A
……. tour of G is a tour which includes every edge of G exactly once ?
A
Hamiltonian
B Planar
C Isomorphic
D Euler

Answer
Id 4
Question Which of the following is not a type of graph?
A
Euler
B Hamiltonian
C Tree
D Path

Answer D

Id 5
Question Choose the most appropriate definition of plane graph ?
A
A graph drawn in a plane in such a way that any pair of edges meet only at their end
vertices
B A graph drawn in a plane in such a way that if the vertex set of graph can be partitioned
into two non - empty disjoint subset X and Y in such a way that each edge of G has one
end in X and one end in Y.
C A simple graph which is Isomorphic to Hamiltonian graph
D None of these

Answer A

Id 6
Question A path in graph G, which contains every vertex of G once and only once
A
Euler tour
B Hamiltonian Path
C Euler trail
D Hamiltonian tour

Answer B
Id 7
Question A minimal spanning tree of a graph G is.... ?
A
A spanning sub graph
B A tree
C Minimum weights
D All of above
Answer D

Id 8
Question A vertex of a graph is called even or odd depending upon ?
A
Total number of edges in a graph is even or odd
B Total number of vertices in a graph is even or odd
C Its degree is even or odd
D None of these

Answer C

Id 9
Question The degree of any vertex of graph is .... ?
A
The number of edges incident with vertex
B Number of vertex in a graph

C Number of vertices adjacent to that vertex

D Number of edges in a graph

Answer A
Id 10
Question If for some positive integer k, degree of vertex d(v)=k for every vertex v of the graph G,
then G is called... ?
A
K graph
B K-regular graph
C Empty graph
D All of above

Answer B

Id 11
Question A graph with no edges is known as empty graph. Empty graph is also known as... ?
A
Trivial graph

B Regular graph
C Bipartite graph

D None of these

Answer A

Id 12
Question A graph G is called a ..... if it is a connected acyclic graph
A
Cyclic graph
B Regular graph
C Tree
D Not a graph

Answer C
Id 13
Question Eccentricity of a vertex denoted by e(v) is defined by.... ?
A max { d(u,v): u belongs to v, u does not equal to v : where d(u,v) is the distance between
u&v}
B min { d(u,v): u belongs to v, u does not equal to v }

C Both A and B

D None of these
Answer A

Id 14
Question Complete graph has exactly…….number of edges.
A
n
B n(n-1)
C n+2
D n(n-1) ∕ 2
Answer D

Id 15
Question Any graph S is called as spanning sub graph of G if
A
Vertex set of G equal to S
B Vertex set of G not equal to S
C Edge set of G and S are equal
D None of Above

Answer A
Id 16
Question A sub graph of a graph G that contains every vertex of G and is a tree is called
A
Trivial tree
B empty tree
C Spanning tree
D Full tree
Answer C

Id 17
Question In the planar graph, the graph crossing number of edges is
A 0
B 1
C 2
D 3
Answer A

Id 18
Question
Choose one: The degrees of {a, b, c, d, e} in the given graph is

a b

V
d ,c
oe

A
2, 2, 3, 1, 1
B 2, 3, 1, 0, 1
C 0, 1, 2, 2, 0
D 2, 3, 1, 2, 0

Answer D
Id 19
Question Suppose that a connected planar simple graph has 30 edges. If a plane drawing of this
graph has 20 faces, how many vertices does the graph have?
A 15
B 12
C 13
D 14
Answer B

Id 20
Question The number of colors required to properly color the vertices of every planer graph is

A 2
B 3
C 4
D 5
Answer D

Id 21
Question Let G be a simple undirected planar graph on 11 vertices with 15 edges. If G is a
connected graph, then the number of bounded faces in any embedding of G on the plane
is equal to
A 3
B 4
C 5
D 6
Answer D

Id 22
Question A graph with n vertices will definitely have a parallel edge or self loop of the total number
of edges are
A more than n
B more than n+1
C more than (n+1)/2
D more than n(n-1)/2
Answer D
Id 23
Question In an undirected graph the number of nodes with odd degree must be
A Zero
B Odd
C Prime
D Even
Answer D

Id 24
Question Which two of the following are equivalent for an undirected graph G?
(i) G is a tree
(ii) There is at least one path between any two distinct vertices of G
(iii) G contains no cycles and has (n-1) edges
(iv)G has n edges
A (i) and (ii)
B (i) and (iii)
C (i) and (iv)
D (ii) and (iii)
Answer B

Id 25
Question An undirected graph possesses an eulerian circuit if and only if it is connected and its
vertices are

A all of even degree


B all of odd degree
C of any degree
D even in number
Answer A

Id 26
Question Maximum number of edges in a n-Node undirected graph without self loop is
A n2
B n(n – 1)
C n(n + 1)
D n(n – 1)/2
Answer D
Id 27
Question In a graph if e=[u, v], Then u and v are called

A Endpoints of e
B Adjacent nodes
C Neighbors
D All of above
Answer D

Id 28
Question The maximum degree of any vertex in a simple graph with n vertices is

A n–1
B n+1
C 2n–1
D n
Answer A

Id 29
Question Which of the following statement is true

A Every graph is not its own subgraph


B The terminal vertex of a graph are of degree two.
C A tree with n vertices has n edges.
D A single vertex in graph G is a subgraph of G.
Answer D

Id 30
Question G1 and G2 are two graphs as shown :

d e f
A Both G1 and G2 are planar graphs
B Both G1 and G2 are not planar graphs.
C G1 is planar and G2 is not planar graph.
D G1 is not planar and G2 is planar graph.
Answer D

Id 31
Question In any undirected graph the sum of degrees of all the nodes
A Must be even
B Are twice the number of edges
C Must be odd
D Need not be even
Answer B

Id 32
Question The complete graph with four vertices has k edges where k is
A 3
B 4
C 5
D 6
Answer D

Id 33
Question The number of edges in K10 is
A 40
B 42
C 44
D None
Answer D

Id 34
Question Consider the graph given below
A A B C D
A 1 1 1 1
B 1 1 1 1
C 0 0 0 1
D 0 0 0 0
B A B C D
A 0 1 0 0
B 1 0 0 0
C 0 0 0 1
D 0 0 0 0
C A B C D
A 0 1 0 1
B 1 1 0 1
C 0 0 0 1
D 0 0 0 0
D A B C D
A 0 1 0 0
B 1 0 1 0
C 0 0 0 1
D 0 0 0 0
Answer D

Id 35
Question A vertex of degree zero in a graph is called

A Pendant vertex
B isolated vertex
C adjacent vertex
D none of these
Answer B

Id 36
Question Consider the graph G shown below
Then G is a

A Complete graph
B Regular graph
C Complete bipartite graph
D Null graph
Answer C

Id 37
Question The number of edges, the complete graph K5 has
A 5
B 6
C 9
D 10
Answer D

Id 38
Question Consider the graph G and its subgraphs G1 and G2

GI

Then G1 and G2 are


A Vertex disjoint subgraphs
B regular subgraphs
C spanning subgraphs
D None of these
Answer A

Id 39
Question If H is a spanning subgraph of graph G such that degree of each vertex of H is K, then H
is called
A K-factor graph of G
B null subgraph of G
C complement of graph G
D none of these
Answer A

Id 40
Question The Complete bipartite graph K2,3 has
A Eulerian circuit
B Hamiltonian circuit
C Both Eulerian and Hamiltonian circuit
D Neither Eulerian and Hamiltonian circuit
Answer D
Id 41
Question Consider the following graph. It has
a
_------ ·-----_

b ,c

A Eulerian circuit
B Hamiltonian circuit
C Both Eulerian and Hamiltonian circuit
D Neither Eulerian and Hamiltonian circuit
Answer B

Id 42
Question The number of regions defined by connected planar graph with 6 vertices and 10 edges is
A 6
B 7
C 5
D 4
Answer A

Id 43
Question The minimum number of colors needed to produce a proper coloring of simple connected
graph G is called
A Edge connectivity of G
B Chromatic number of G
C Vertex connectivity of G
D None of these
Answer B

Id 44
Question The chromatic number of the complete graph Kn on the vertices is
A (n-1)
B (n + 1)
C n
D n-2
Answer C

Id 45
Question Give the bipartite partitioning of the given graph
2 3

1/ ~ 4

M
~ / 5
7 6

A X={1, 3, 5, 7 }, Y= {2, 4, 6, 8 }
B X={1, 2, 3, 4 }, Y= {5, 6, 7, 8 }
C X={2, 3 }, Y= {1, 4, 5, 6 }
D None of these
Answer A
Id 46
Question Which of the following is not bipartite graph?

( a) (h) (r.) {d)

A a
B b
C c
D d
Answer B

Id 47
Question Find the complement of the following graph

v4 vS
A

v4 v5

v4 v5

v4 vS
D None
Answer C

Id 48
Question Find the graph that has Hamiltonian circuit
a.

C h

e d g

A G1 and not G2
B Nether G1 and G2
C G2 and not G1
D Both G1 and G2
Answer D

Id 49
Question Two graphs G1 and G2 are isomorphic if__________________
A Number of vertices and edges in G1 and G2 are same
B G1 has n vertices of degree k then G2 must have exactly n vertices of degree k
C Adjacency is preserved
D All of these
Answer D

Id 50
Question A subgraph G’ of G is known as spanning subgraph if________
A G’ contains all the edges of G
B G’ contains all the vertices of G
C Both (a) and (b)
D None of these
Answer B

Id 51
Question A graph with n vertices is complete graph if _________
A Degree of each vertex is n
B Degree of each vertex is (n- 1)
C Degree of each vertex is (n + 1)
D Degree of each vertex is 2n
Answer B

Id 52
Question Find out self complementary graph from the following options
A

B

C
0
D
z
None of these
Answer C

Id 53
Question Find the complement of the following graph
b

a e c

d
B b

C IJ

D None

Answer B

Id 54
Question Consider the graph given below
a

d e

A It contains Euler circuit


B It contains euler path
C It does not have Hamiltonian cycle
D All of these
Answer D
Marks 2
Unit 4
Id 55
Question Find the number of edges in a graph with 6 nodes, 2 of degree 4 and 4 of degree 2.
A 12
B 12
C 8
D None of these
Answer C

Id 56
Question Select the strongly connected graph

G2
A Only G1
B Only G2
C Both G1 and G2
D None of these
Answer B

Id 57
Question Sum of the degree of all vertices in the following graph is …….

e
,c ,d

A 11
B 10
C 13
D None
Answer B

Id 58
Question The matrix representation of the graph in fig is
A a b c d
a 0 1 1 1
b 1 1 1 1
c 2 1 0 1
d 1 1 1 1
B a b c d
a 0 1 2 1
b 1 1 1 1
c 2 1 0 1
d 1 0 1 1
C a b c d
a 0 1 2 1
b 1 1 1 0
c 2 1 0 1
d 1 0 1 1
D None of these
Answer C

Id 59
Question If no self loop and no parallel edges are present in a graph, the graph is known as
A Multigraph
B Pseudograph
C Simple graph
D None of these
Answer C

Id 60
Question A proper coloring of graph G is an assignment of colors to its vertices so that
A Two adjacent vertices have the same color
B No two adjacent vertices have the same color
C All the vertices have same color
D None of these
Answer B

Id 61
Question How many edges the planar graph have if it has 7 regions and 5 nodes.
A 8
B 7
C 10
D 6
Answer C

Id 62
Question A graph is said to be self complementary if
A It is simple graph
B It is a bipartite graph
C It is isomorphic to its complement
D It is a complete graph
Answer C

Id 63
Question If the degree of each vertex is same in any graph G, then the graph G is called as
A Simple graph
B Complete graph
C Regular graph
D Null graph
Answer C

Id 64
Question In the following graph, the parallel edges are

e4

A e1, e2
B e2,e3
C e3, e5
D e3,e4
Answer D

Id 65
Question In the following graph, the adjacent edges are

e4

A e1, e3
B e2,e5
C e1,e4
D None of these
Answer B

Id 66
Question The directed graph is shown below. The indegree of the vertex v1 is

A 1
B 2
C 3
D 4
Answer C

Id 67
Question The number of nodes required to construct a graph with exactly 6 edges in which each
node is of degree 2 is
A 5
B 8
C 6
D 4
Answer C

Id 68
Question Consider the following graph G and its subgraph G1 and G2

a b a.
a

,d
7Gl
,c
d

G2
,c

G
A Vertex disjoint subgraphs
B Edge disjoint subgraphs
C Spanning subgraphs
D None of these
Answer B

Id 69
Question Consider the following graph, the vertex connectivity of the graph is

v2

v3
A 1
B 3
C 2
D 4
Answer C

Id 70
Question Consider the following graph, the edge connectivity of the graph is
v2

v4 v3
A 3
B 2
C 1
D 4
Answer A

Id 71
Question The chromatic number of complete bipartite graph Km,n is
A m
B n
C 2
D 1
Answer C

Id 72
Question The number of edges in complete bipartite graph having 10 and 12 vertices are________
A 22
B 120
C 2
D None
Answer B

Id 73
Question Find the intersection of the following two graphs G1 and G2
vl

11/
v3 v2
G2

A vl

v2 v3
B vl

C
v2
A v3

v2 v3

D None of these
Answer B

Id 74
Question The complement of Km,n will consist of ______________ connected components
A 1
B 2
C 3
D n
Answer B

Id 75
Question A Eulerian circuit passes through
A Every edge exactly once
B Every vertex exactly once with the first and the last vertex same
C Both (a) and (b)
D None of these
Answer A

Id 76
Question A Hamiltonian circuit passes through
A Every edge exactly once
B Every vertex exactly once with the first and the last vertex same
C Both (a) and (b)
D None of these
Answer B

Id 77
Question If self-loops as well as parallel edges are allowed, the graph is known as ____.
A multigraph
B pseudograph

C simple graph
D none of these
Answer B

Id 78
Question If no self-loop and no parallel edges are present in a graph, the graph is known as ___ .
A multigraph

B pseudograph
C simple graph
D none of these
Answer C
Id 79
Question How many nodes are necessary to construct a graph with exactly 8 edges in which each
node is of degree 2?

A 2

B 4

C 8
D 16
Answer C

Id 80
Question A directed graph, e is an edge from a to b then _____.

A
a is known as initial vertex and b is not a terminal vertex

B
a is not initial vertex and b is a terminal vertex.

C
a is not initial vertex and b is not a terminal vertex

D
a is initial vertex and b is a terminal vertex.

Answer D

Id 81
Question No. of edges in a complete graph Kn is ____.

A n

B n
2

C n(n - 1) / 2
D n(n + 1) /2
Answer C

Id 82
Question Which is true?

A complete graph <=> regular graph

B complete graph => regular graph but converse need not be true

C regular graph => complete graph but converse need not be true

D none of these

Answer B

Id 83
Question A complete bipartite graph Km, n is regular if____.
A
m>n

B
m<n

C
m=n

D
None of these

Answer C
Id 84
Question How many edges K6 (complete graph with 6 vertices) has?
A
30

B
15

C
6

D
21

Answer B

Id 85
Question How many edges K4,6 has ?

A 24

B 10

C 12

D 15

Answer A

Id 86
Question Which graph is complete bipartite graph but not a regular graph ?

A K3,3
B K4,4
C K1,6
D none of these
Answer C

Id 87
Question A vertex with degree one is known as __.

A Pendant vertex
B isolated vertex

C node
D junction
Answer A

Id 88
Question A graph is known as null graph if__.

A it has no edges
B it has no vertices

C it has no edges and no vertices


D none of these
Answer A

Id 89
Question A graph with 4 nodes and 7 edges can not be a__.

A multigraph
B pseudograph

C simple graph
D all of these
Answer C

Id 90
Question Under which condition Km,n , the complete bipartite graph will have an Eulerian circuit ?

A If m = n and both are odd


B If m != n and either m is odd or n is odd

C If both m and n are even (m = n or m != n)


D none of these
Answer C

Id 91
Question How many Hamiltonian circuits exists in Kn ?

A N
B n-1
C n(n - 1) / 2
D (n - 1)! / 2
Answer D

Id 92
Question If v, e and r are the total number of vertices, edges and regions in the graph, then for any
aph, which condition is satisfied?

A v+e+r=2
B v-e+r=2
C v+e-r=2
D v-e-r=2
Answer B

Id 93
Question which graphs are non planar graphs?

A K5

B K3,3

C both (a) and (b)


D none of these
Answer C

Id 94
Question If parallel edges are allowed but self loops are not permitted, the graph is known as ___.

A
multigraph

B
pseudograph

C
simple graph

D
none of these

Answer A

Id 95
Question The sum of the degrees of the vertices of the graph is___.

A
same as no. of edge
B
twice the no. of edges

C
half the no. of edges

D
none of these

Answer B

Id 96
Question Maximum number of edges in a simple graph with n vertices is__.

A n(n+1) / 2

B n

C 2n

D n(n-1)/2

Answer D

Id 97
Question A complete bipartite graph Km,n is regular if____.

A m>n
B m<n

C m=n
D none of these
Answer C

Id 98
Question Which one of the following is the example of non linear data structure
A Graph

B Binary Tree

C Queue

D Link List

Answer A

Id 99
Question Let A be an adjacency matrix of a graph G. The ij th entry in the matrix AK , gives

A The number of paths of length K from vertex Vi to vertex Vj.

B Shortest path of K edges from vertex Vi to vertex Vj.

C Length of a Eulerian path from vertex Vi to vertex Vj.

D Length of a Hamiltonian cycle from vertex Vi to vertex Vj.

Answer B

Id 100
Question An undirected graph G with n vertices and e edges is represented by adjacency list. What
is the time required to generate all the connected components?
A O (n)

B O (e)

C O (e+n)

D O (e2 )

Answer C
Id 101
Question An adjacency matrix representation of a graph cannot contain information of :

A nodes
B edges
C direction of edges
D parallel edges
Answer D

Marks 1
Unit 4

Id 102
Question In handshaking lemma the sum of the degrees of the vertices of a graph is
_____________the number of edges
A Twice

B Thrice

C Equal

D None of these

Answer A
((MARKS)) 1
(1/2/3...)
((QUESTION From a group of 7 men and 6 women, five persons are to be
)) selected to form a committee so that at least 3 men are
there on the committee. In how many ways can it be done?
((OPTION_A) 564
)
((OPTION_B) 645
)
((OPTION_C) 735
)
((OPTION_D) 756
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
We may have (3 men and 2 women) or (4 men and 1 woman) or (5 men
((EXPLANAT only).
ION))
.. 7 6 7 6 7
(OPTIONAL) Required number of ways= ( C3 x C2) + ( C4 x C1) + ( C5)
7x6x5 6x5
= x + (7C3 x 6C1) + (7C2)
( (
3x2x1 2x1
= 525 +
7x6x5
3x2x1
) )[ J
x6 +
7x6
2x1
= (525 + 210 + 21)
= 756.
((MARKS)) 1
(1/2/3...)
((QUESTION)) How many 2 digits numbers can be formed from
the digits 0, 1, 2, 3, 4, 5 ?
((OPTION_A)) 5 x 6
((OPTION_B)) 52
((OPTION_C)) 62
((OPTION_D)) 50
((CORRECT_C A
HOICE))
(A/B/C/D)
((EXPLANATI To form two digit number, the first digit must be non-zero
ON)) and second may be any digit.
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION)) In how many ways 4 boys and 3 girls can be seated in
a row so that they are alternate.
((OPTION_A)) 144
((OPTION_B)) 288
((OPTION_C)) 12
((OPTION_D)) 256
((CORRECT_C A
HOICE))
(A/B/C/D)
((EXPLANATI Let the Arrangement be,
ON)) BGBGBGB
(OPTIONAL)
4 boys can be seated in 4! Ways.
Girl can be seated in 3! Ways.
Required number of ways,
= 4!*3! = 144.
((MARKS)) 2
(1/2/3...)
((QUESTION)) There are 30 people in a party. If everyone is to shake
hands with one another, how many hand shakes are
possible?
((OPTION_A)) 180
((OPTION_B)) 256
((OPTION_C)) 386
((OPTION_D)) 435
((CORRECT_C D
HOICE))
(A/B/C/D)
((EXPLANATI Total number of persons = n = 30
ON)) Shake hands involve only 2 persons = r = 2
(OPTIONAL) Number of shake hands = nCr = 30C2
30
C2 = (30 * 29) /(2 * 1) = 435
n
Cr = (n!) / r! (n – r)!
= 30! / 2! 28!
= 435
((MARKS)) 1
(1/2/3...)
((QUESTION)) A man positioned at the origin of the coordinate system.
The man can take steps of unit measure in the direction
North, East, West or South. Find the number of ways of
he can reach the point (5,6), covering the shortest
possible distance.
((OPTION_A)) 252
((OPTION_B)) 432
((OPTION_C)) 462
((OPTION_D)) 504
((CORRECT_C C
HOICE))
(A/B/C/D)
((EXPLANATI In order to reach (5,6) covering the shortest distance at the
ON)) same time the man has to make 5 horizontal and 6 vertical
(OPTIONAL) steps.
The number of ways in which these steps can be taken is
given by:
11! /(5! *6!) = 462
((MARKS)) 2
(1/2/3...)
((QUESTION)) a,b,c,d and e are five natural numbers. Find the number
of ordered sets (a,b,c,d,e) possible such that :
a + b + c + d + e =64
((OPTION_A)) 64
C5
((OPTION_B)) 68
C4
((OPTION_C)) 65
C4
((OPTION_D)) 63
C5
((CORRECT_C B
HOICE))
(A/B/C/D)
((EXPLANATI
ON))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION In how many different ways can the letters of the
)) word 'LEADING' be arranged in such a way that the
vowels always come together?
((OPTION_A) 360
)
((OPTION_B) 480
)
((OPTION_C) 720
)
((OPTION_D) 5040
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
The word 'LEADING' has 7 different letters.
((EXPLANAT
ION)) When the vowels EAI are always together, they can be supposed to form one
(OPTIONAL) letter.
Then, we have to arrange the letters LNDG (EAI).

Now, 5 (4 + 1 = 5) letters can be arranged in 5! = 120 ways.

The vowels (EAI) can be arranged among themselves in 3! = 6 ways.

Required number of ways = (120 x 6) = 720.


((MARKS)) 1
(1/2/3...)
((QUESTION)) How many 6 digit telephone numbers can be formed if
each number starts with 35 and no digit appears more
than once?
((OPTION_A)) 720
((OPTION_B)) 360
((OPTION_C)) 1420
((OPTION_D)) 1680
((CORRECT_C D
HOICE))
(A/B/C/D)
((EXPLANATI The first two places can only be filled by 3 and 5
ON)) respectively and there is only 1 way for doing this.
(OPTIONAL) Given that no digit appears more than once. Hence we
have 8 digits remaining (0,1,2,4,6,7,8,9)
So, the next 4 places can be filled with the remaining 8
digits in 8P4 ways.
Total number of ways = 8P4 =8×7×6×5=1680
((MARKS)) 2
(1/2/3...)
((QUESTION In how many different ways can the letters of the word
)) 'CORPORATION' be arranged so that the vowels always
come together?
((OPTION_A) 810
)
((OPTION_B) 1440
)
((OPTION_C) 2880
)
((OPTION_D) 50400
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
In the word 'CORPORATION', we treat the vowels OOAIO as one letter.
((EXPLANAT
ION)) Thus, we have CRPRTN (OOAIO).
(OPTIONAL)
This has 7 (6 + 1) letters of which R occurs 2 times and the rest are different.

7!
Number of ways arranging these letters = = 2520.
2!

Now, 5 vowels in which O occurs 3 times and the rest are different, can be
arranged

5!
in = 20 ways.
3!

Required number of ways = (2520 x 20) = 50400.


((MARKS)) 1
(1/2/3...)
((QUESTION)) 25 buses are running between two places P and Q.
In how many ways can a person go from P to Q and
return by a different bus?
((OPTION_A)) None of these
((OPTION_B)) 600
((OPTION_C)) 576
((OPTION_D)) 625
((CORRECT_C B
HOICE))
(A/B/C/D)
((EXPLANATI He can go in any of the 25 buses (25 ways).
ON))
(OPTIONAL)
Since he cannot come back in the same bus, he can return
in 24 ways.

Total number of ways =25×24=600


((MARKS)) 2
(1/2/3...)
A question paper consists of 10 questions divided into two parts A and B.
((QUESTION)) Each part contains five questions. A candidate is required to attempt six
questions in all of which at least 2 should be from part A and at least 2
from part B. In how many ways can the candidate select the questions if
he can answer all questions equally well?
((OPTION_A)) 500
((OPTION_B)) 100
((OPTION_C)) 150
((OPTION_D)) 200
((CORRECT_C D
HOICE))
(A/B/C/D)
((EXPLANATI The candidate has to select six questions in all of which at least two
should be from Part A and two should be from Part B. He can select
ON))
questions in any of the following ways:
(OPTIONAL)
Choice Part A Part B
(i) 2 4
(ii) 3 3
(iii) 4 2

If the candidate follows choice (i), the number of ways in


which he can do so is:
5
C2×5C4=10×5=50
If the candidate follows choice (ii), the number of ways in
which he can do so is:
5
C3×5C3=10×10=100
Similarly, if the candidate follows choice (iii), then the
number of ways in which he can do so is:
5
C4×5C2=5×10=50
Therefore, the candidate can select the question in
50+100+50 = 200 ways.
((MARKS)) 2
(1/2/3...)
((QUESTION Out of 7 consonants and 4 vowels, how many words of 3
)) consonants and 2 vowels can be formed?
((OPTION_A) 210
)
((OPTION_B) 1050
)
((OPTION_C) 25200
)
((OPTION_D) 21400
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
Number of ways of selecting (3 consonants out of 7) and (2 vowels out of 4)
((EXPLANAT
ION)) = (7C3 x 4C2)
(OPTIONAL) 7x6x5 4x3
=( x
3x2x1 2x1 J
= 210.

Number of groups, each having 3 consonants and 2 vowels = 210.

Each group contains 5 letters.

Number of ways of arranging


= 5!
5 letters among themselves
=5x4x3x2x1
= 120.

.. Required number of ways = (210 x 120) = 25200.


((MARKS)) 1
(1/2/3...)
((QUESTION In how many ways can the letters of the word
)) 'LEADER' be arranged?
((OPTION_A) 720
)
((OPTION_B) 360
)
((OPTION_C) 144
)
((OPTION_D) 72
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
The word 'LEADER' contains 6 letters, namely 1L, 2E, 1A, 1D and 1R.
((EXPLANAT
ION)) Required number of ways =
6!
= 360.
(OPTIONAL) (1!)(2!)(1!)(1!)(1!)
((MARKS)) 1
(1/2/3...)
((QUESTION How many 3-digit numbers can be formed from the digits
)) 2, 3, 5, 6, 7 and 9, which are divisible by 5 and
none of the digits is repeated?
((OPTION_A) 5
)
((OPTION_B) 10
)
((OPTION_C) 15
)
((OPTION_D) 20
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
Since each desired number is divisible by 5, so we must have 5 at the unit
((EXPLANAT place. So, there is 1 way of doing it.
ION))
(OPTIONAL) The tens place can now be filled by any of the remaining 5 digits (2, 3, 6, 7,
9). So, there are 5 ways of filling the tens place.

The hundreds place can now be filled by any of the remaining 4 digits. So,
there are 4 ways of filling it.

Required number of numbers = (1 x 5 x 4) = 20.


((MARKS)) 1
(1/2/3...)
((QUESTION In how many ways a committee, consisting of 5 men and 6
)) women can be formed from 8 men and 10 women?
((OPTION_A) 266
)
((OPTION_B) 5040
)
((OPTION_C) 11760
)
((OPTION_D) 86400
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
Required number of ways= (8C5 x 10C6)
((EXPLANAT = (8C3 x 10C4)
ION)) 8 x 7 x 6 10 x 9 x 8 x 7
(OPTIONAL) ( x
= 3x2x1 4x3x2x1 J
= 11760.
((MARKS)) 1
(1/2/3...)
((QUESTION A box contains 2 white balls, 3 black balls and 4
)) red balls. In how many ways can 3 balls be drawn
from the box, if at least one black ball is to be
included in the draw?
((OPTION_A) 64
)
((OPTION_B) 48
)
((OPTION_C) 32
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
We may have(1 black and 2 non-black) or (2 black and 1 non-black) or (3
((EXPLANAT black).
ION))
.. 3 6 3 6 3
(OPTIONAL) Required number of ways= ( C1 x C2) + ( C2 x C1) + ( C3)
(
= 3x
6x5
2x1 )(+
= (45 + 18 + 1)
3x2
2x1 )
x6 +1

= 64.
((MARKS)) 1
(1/2/3...)
((QUESTION In how many ways can 8 Indians and, 4 American and 4
)) Englishmen can be seated in a row so that all person
of the same nationality sit together?
((OPTION_A) 3! 4! 8! 4!
)
((OPTION_B) 3! 8!
)
((OPTION_C) 4! 4!
)
((OPTION_D) 8! 4! 4!
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION In how many ways can 10 examination papers be arranged
)) so that the best and the worst papers never come together?
((OPTION_A) 8*9!
)
((OPTION_B) 8*8!
)
((OPTION_C) 7*9!
)
((OPTION_D) 9*8!
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 2
(1/2/3...)
((QUESTION In the next World cup of cricket there will be 12 teams,
)) divided equally in two groups. Teams of each group will
play a match against each other. From each group 3 top
teams will qualify for the next round. In this round each
team will play against each others once. Four top teams
of this round will qualify for the semifinal round, where
they play the best of three matches. The Minimum number
of matches in the next World cup will be:
((OPTION_A) 54
)
((OPTION_B) 53
)
((OPTION_C) 38
)
((OPTION_D) 43
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION A letter lock consists of 4 rings, each ring contains 9
)) non-zero digits. This lock can be opened by setting four
digit code with the proper combination of each of the 4
rings. Maximum how many codes can be formed to open the

((OPTION_A) 4
9

)
((OPTION_B) 94
)
((OPTION_C) P4
9

)
((OPTION_D) None
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) 1
(1/2/3...)
((QUESTION If 5* nP3 = 4* (n+1)P3, find n?
))
((OPTION_A) 10
)
((OPTION_B) 11
)
((OPTION_C) 12
)
((OPTION_D) 14
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION Ten different letters of alphabet are given, words
)) with 5 letters are formed from these given letters.
Then, the number of words which have at least one
letter repeated is:
((OPTION_A) 69760
)
((OPTION_B) 30240
)
((OPTION_C) 99748
)
((OPTION_D) 42386
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT Number of words which have at least one letter replaced,
= Total number of words - total number of words in which no letter is repeated.
ION)) => 105 – 10P5.
(OPTIONAL) => 100000 − 30240 = 69760.

((MARKS)) 2
(1/2/3...)
((QUESTION 12 chairs are arranged in a row and are numbered 1 to 12.
))
4 men have to be seated in these chairs so that the chairs
numbered 1 to 8 should be occupied and no two men
occupy adjacent chairs. Find the number of ways the
task can be done.
((OPTION_A) 384
)
((OPTION_B) 390
)
((OPTION_C) 432
)
((OPTION_D) 470
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT Given there are 12 numbered chairs, such that chairs numbered 1 to 8 should be
occupied.
ION)) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12.
(OPTIONAL) The various combinations of chairs that ensure that no two men are sitting
together are listed.
(1, 3, 5,__), The fourth chair can be 5,6,10,11 or 12, hence 5 ways.
(1, 4, 8, __), The fourth chair can be 6,10,11 or 12 hence 4 ways.
(1, 5, 8, __), the fourth chair can be 10,11 or 12 hence 3 ways.
(1, 6, 8,__), the fourth chair can be 10,11 or 12 hence 3 ways.
(1,8,10,12) is also one of the combinations.
Hence, 16 such combinations exist.
In case of each these combinations we can make the four men inter arrange in 4!
ways.
Hence, the required result =16�4!= 384.

((MARKS)) 1
(1/2/3...)
((QUESTION What is the probability of drawing 2 kings from a deck
)) (one after another )
((OPTION_A) 0.5%
)
((OPTION_B) 0.4%
)
((OPTION_C) 10%
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION 70% of your friends like chocolate, 35% like chocolate and
)) Strawberry. What % of those who like chocolate also like
Strawberry.
((OPTION_A) 35%
)
((OPTION_B) 50%
)
((OPTION_C) 70%
)
((OPTION_D) 100%
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION You want to be goalkeeper in football final match. It
)) Depends on who is coach that day. With coach Sam
Probability of being Goalkeeper is 0.5. With coach
Alex probability of being Goalkeeper is 0.3. Sam is coach
For 60% time. So what is the probability you being
Goalkeeper for final match?
((OPTION_A) 40%
)
((OPTION_B) 50%
)
((OPTION_C) 60%
)
((OPTION_D) None
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION 5 different books are issued to 5 students (1 for each).
)) Suppose books were returned and again distributed so that
No student can take same book twice, in how many ways
It can be done?
((OPTION_A) 5280
)
((OPTION_B) 6000
)
((OPTION_C) 7000
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION How many different salads can be made from 5 different
)) Fruits, when only one fruit can also be used in a salad.
((OPTION_A) 32
)
((OPTION_B) 31
)
((OPTION_C) 5!
)
((OPTION_D) None
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION How many 4 digit even numbers have all 4 digits distinct?
))
((OPTION_A) 2200
)
((OPTION_B) 504
)
((OPTION_C) 1792
)
((OPTION_D) 2296
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION How many binary sequences are there with length 15 with
)) Exactly 6 ones.
((OPTION_A) 5000
)
((OPTION_B) 15P6
)
((OPTION_C) 5005
)
((OPTION_D) None
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION 4 coins are tossed. Find probability of getting 2 heads and
)) 2 tails.
((OPTION_A) 3/16
)
((OPTION_B) 6/8
)
((OPTION_C) 3/8
)
((OPTION_D) None
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION What will be the coefficient of p11q12 in the expansion of
)) (p+q)23
((OPTION_A) 23!/(11!12!)
)
((OPTION_B) 23!
)
((OPTION_C) 23!/(11!)
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION What will be the coefficient of p5q6 in the expansion of
)) (3p-2q)11
((OPTION_A) 7185024
)
((OPTION_B) 5!*6!
)
((OPTION_C) 1352078
)
((OPTION_D) None
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION nC1+2. nC2+…+n. nCn=?
))
((OPTION_A) n.2n
)
((OPTION_B) n.2n-1
)
((OPTION_C) 2n
)
((OPTION_D) None
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION nC1 - 2. nC2+…+(-1)n-1n. nCn=?
))
((OPTION_A) n
)
((OPTION_B) 1
)
((OPTION_C) 2
)
((OPTION_D) 0
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION Find the term independent of x in the expansion of
)) (x2+1/x3)5
((OPTION_A) 8
)
((OPTION_B) 9
)
((OPTION_C) 10
)
((OPTION_D) None
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION 17n-128n2+112n leaves remainder x when divided by y.
)) What is x and y?
((OPTION_A) x=12, y = 16
)
((OPTION_B) x=1, y = 16
)
((OPTION_C) x=10, y = 162
)
((OPTION_D) x=1, y = 163
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 1
(1/2/3...)
((QUESTION For any natural number n, 21n-2n-19n*2n-1 is multiple of?
))
((OPTION_A) 359
)
((OPTION_B) 360
)
((OPTION_C) 361
)
((OPTION_D) 362
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION 25100+2599 is divisible by?
))
((OPTION_A) 674
)
((OPTION_B) 675
)
((OPTION_C) 676
)
((OPTION_D) None
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION Of the students in a college, it is known that 60% reside in
)) Hostel and 40% are day scholars (not residing in hostel).
Previous year results report that 30% of all students who
reside in hostel attain A grade and 20% of day scholars
attain A grade in their annual examination. At the end of
the year, one student is chosen at random from the college
and he has an A grade, what is the probability that the
student is a hostlier?

((OPTION_A) 9/13
)
((OPTION_B) 4/13
)
((OPTION_C) 2/13
)
((OPTION_D) 6/13
)
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT • Given E1,E2,E3.....EnE1,E2,E3.....En are mutually exclusive and exhaustive events, we can find the conditional

ION)) probability P(Ei|A)P(Ei|A) for any event A associated w/ EiEi using the Bayes theorem as

(OPTIONAL) follows: P(Ei/A)P(Ei/A)=P(Ei)P(A/Ei)∑ni=1P(Ei)P(A/Ei)P(Ei)P(A/Ei)∑i=1nP(Ei)P(A/Ei)

Let E1E1: students residing in the hostel →→ P(E1E1) = 60% = 60100=3560100=35

Let E2E2: day scholars →→ P(E2E2) = 40% = 40100=2540100=25

30% of hostel students get an A grade →→ P (E|E1E1) = 30% = 30100=31030100=310

20% of day scholars get an A grade →→ P (E|E2E2) = 20% = 20100=1520100=15

We need to find the probability that a student who is chosen from random that has an A grade is from the hostel.

We can use Baye's theorem, according to

which P(E1|A)=P(E1)(P(A|E1)P(E1)P(A|E1)+P(E2)+P(A|E2)P(E1|A)=P(E1)(P(A|E1)P(E1)P(A|E1)+P(E2)+P(A|E2)

Using Baye's theorem, P (E1E1|A) =35.31035.310+25.1535.31035.310+25.15 = 99+4=913

((MARKS)) 1
(1/2/3...)
((QUESTION In Bayes theorem, what is the meant by P(Hi|E)?
))
((OPTION_A) The probability that hypotheses Hi is true given evidence E
)
((OPTION_B) The probability that hypotheses Hi is false given evidence E
)
((OPTION_C) The probability that hypotheses Hi is true given false
) evidence E
((OPTION_D) The probability that hypotheses Hi is false given false
) evidence E
((CORRECT_ A
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION In answering a question on a multiple choice test,
)) a student either knows the answer or guesses. Let
3/4 be the probability that he knows the answer
and 1/4 be the probability that he guesses.
Assuming that a student who guesses at the answer
will be correct with probability 1/4 . What is
the probability that the student knows the answer
given that he answered it correctly?
((OPTION_A) 1/13
)
((OPTION_B) 12/13
)
((OPTION_C) 6/13
)
((OPTION_D) 8/13
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION A factory has two machines A and B. Past record shows
)) that machine A produced 60% of the items of output
and machine B produced 40% of the items. Further,
2% of the items produced by machine A and 1%
produced by machine B were defective. All the items
are put into one stockpile and then one item is chosen
at random from this and is found to be defective.
What is the probability that it was produced by
machine B?
((OPTION_A) ½
)
((OPTION_B) 1/3
)
((OPTION_C) ¼
)
((OPTION_D) 1/5
)
((CORRECT_ C
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION There are three coins. One is a two headed coin
)) (having head on both faces), another is a biased
coin that comes up heads 75% of the time and third
is an unbiased coin. One of the three coins is chosen
at random and tossed, it shows heads, what is the
probability that it was the two headed coin ?

((OPTION_A) ½
)
((OPTION_B) 3/5
)
((OPTION_C) 2/6
)
((OPTION_D) 4/9
)
((CORRECT_ D
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)

((MARKS)) 2
(1/2/3...)
((QUESTION A bag contains 4 red and 4 black balls, another
)) bag contains 2 red and 6 black balls. One of the two
bags is selected at random and a ball is drawn from
the bag which is found to be red. Find the probability
that the ball is drawn from the first bag.

((OPTION_A) 1/3
)
((OPTION_B) 2/3
)
((OPTION_C) ¼
)
((OPTION_D) 3/7
)
((CORRECT_ B
CHOICE))
(A/B/C/D)
((EXPLANAT
ION))
(OPTIONAL)
((MARKS)) (1/2/3...) 1

((QUESTION)) What will be the output of the program ?


#include<stdio.h>

int main()
{
int a[5] = {5, 1, 15, 20, 25};
int i, j, m;
i = ++a[1];
j = a[1]++;
m = a[i++];
printf("%d, %d, %d", i, j, m);
return 0;
}

((OPTION_A)) 2,1,15

((OPTION_B)) 1,2,5

((OPTION_C)) 3,2,15

((OPTION_D)) 2,3,20

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION)) Step 1: int a[5] = {5, 1, 15, 20, 25}; The variable arr is declared as an
(OPTIONAL) integer array with a size of 5 and it is initialized to
a[0] = 5, a[1] = 1, a[2] = 15, a[3] = 20, a[4] = 25 .
Step 2: int i, j, m; The variable i,j,m are declared as an integer type.
Step 3: i = ++a[1]; becomes i = ++1; Hence i = 2 and a[1] = 2
Step 4: j = a[1]++; becomes j = 2++; Hence j = 2 and a[1] = 3.
Step 5: m = a[i++]; becomes m = a[2]; Hence m = 15 and i is
incremented by 1(i++ means 2++ so i=3)
Step 6: printf("%d, %d, %d", i, j, m); It prints the value of the
variables i, j, m
Hence the output of the program is 3, 2, 15

((MARKS)) (1/2/3...) 1
((QUESTION)) In C, if you pass an array as an argument to a function, what actually gets
passed?
((OPTION_A)) Value of elements in array
First element of the array
((OPTION_B))

((OPTION_C)) Base address of the array

((OPTION_D)) Address of the last element of array

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION)) The statement 'C' is correct. When we pass an array as a funtion


(OPTIONAL) argument, the base address of the array will be passed.

((MARKS)) (1/2/3...) 1
Which of the following statements are correct about 6 used in the
((QUESTION))
program?
int num[6];
num[6]=21;
((OPTION_A)) In the first statement 6 specifies a particular element, whereas in the
second statement it specifies a type.
((OPTION_B)) In the first statement 6 specifies a array size, whereas in the second
statement it specifies a particular element of array.

((OPTION_C)) In the first statement 6 specifies a particular element, whereas in the


second statement it specifies a array size.
((OPTION_D)) In both the statement 6 specifies array size.

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION)) The statement 'B' is correct, because int num[6]; specifies the size of
(OPTIONAL) array and num[6]=21; designates the particular element(7thelement) of
the array.

((MARKS)) (1/2/3...) 1

((QUESTION)) What does the following declaration mean?


int (*ptr)[10];
((OPTION_A)) ptr is array of pointers to 10 integers

((OPTION_B)) ptr is a pointer to an array of 10 integers

((OPTION_C)) ptr is an array of 10 integers

((OPTION_D)) ptr is an pointer to array

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Which of the following statements are correct about an array?


1. The array int num[26]; can store 26 elements.
2. The expression num[1] designates the very first element in the
array.
3. It is necessary to initialize the array at the time of declaration.
4. The declaration num[SIZE] is allowed if SIZE is a macro.
1
((OPTION_A))

1,4
((OPTION_B))

2,3
((OPTION_C))

2,4
((OPTION_D))

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION)) 1. The array int num[26]; can store 26 elements. This statement is
(OPTIONAL) true.
2. The expression num[1] designates the very first element in the
array. This statement is false, because it designates the second
element of the array.
3. It is necessary to initialize the array at the time of declaration. This
statement is false.
4. The declaration num[SIZE] is allowed if SIZE is a macro. This
statement is true, because the MACRO just replaces the symbol SIZE
with given value.
Hence the statements '1' and '4' are correct statements.

((MARKS)) (1/2/3...) 1

((QUESTION)) The smallest element of an array index called……

Lower bound
((OPTION_A))

Upper bound
((OPTION_B))

Range
((OPTION_C))

None of Above
((OPTION_D))

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Which of the following function is used to find the first occurrence of a
given string in another string?

((OPTION_A)) strchr()

((OPTION_B)) strrchr()

((OPTION_C)) strstr()
((OPTION_D)) strnset()

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION)) char *strstr(const char *s1, const char *s2);


(OPTIONAL) Return Value:
On success, strstr returns a pointer to the element
in s1 where s2 begins (points to s2 in s1).
On error (if s2 does not occur in s1), strstr returns null.
Example:
#include <stdio.h>
#include <string.h>
int main(void)
{
char *str1 = "IndiaBIX", *str2 = "ia", *ptr;
ptr = strstr(str1, str2);
printf("The substring is: %s\n", ptr);
return 0;
}
Output: The substring is: iaBIX

((MARKS)) (1/2/3...) 1
which of the following is not an asymptotic notation?
((QUESTION))

BIG-O
((OPTION_A))
Omega
((OPTION_B))
Phi
((OPTION_C))

((OPTION_D)) Theta

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)
((MARKS)) (1/2/3...) 1
Step count for the following loop is
((QUESTION))
For(int i=5; i>0; i++)

5 times
((OPTION_A))
N+1 times
((OPTION_B))
Infinite
((OPTION_C))
No execution
((OPTION_D))

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1
Time Complexity is
((QUESTION))

Time required for the machine to compile the program.


((OPTION_A))

Time required for the machine to execute the program.


((OPTION_B))

Time required for the machine to debug the program.


((OPTION_C))

None
((OPTION_D))

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Which of the following data structure is not linear data


structure?
Array
((OPTION_A))

Linked list
((OPTION_B))

All of above
((OPTION_C))

None of above
((OPTION_D))

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Which of the followings are application of data structure?


Facebook
((OPTION_A))

Searching
((OPTION_B))

Sorting
((OPTION_C))

All of above
((OPTION_D))

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Which data structure is used for implementing recursion?

Queue
((OPTION_A))

Stack
((OPTION_B))
Array
((OPTION_C))

List
((OPTION_D))

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Representation of data structure in memory is known


as………….
((OPTION_A)) recursive

((OPTION_B)) Abstract Data Type

((OPTION_C)) Storage Structure

((OPTION_D)) File Structure

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) In a linked list with n nodes, the time taken to insert an


element after an element pointed by some pointer is……..
((OPTION_A)) O (1)
O(log n)
((OPTION_B))

O(n)
((OPTION_C))

O(n log n)
((OPTION_D))
((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) In a circular linked list……….


((OPTION_A)) components are all linked together in some sequential
manner.

((OPTION_B)) there is no beginning and no end.

((OPTION_C)) components are arranged hierarchically.

((OPTION_D)) forward and backward traversal within the list is permitted.


((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Which of the following operators takes only integer


operands?

+
((OPTION_A))

/
((OPTION_B))

%
((OPTION_C))

*
((OPTION_D))

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) NULL pointer is used to define .....

End of the linked list


((OPTION_A))

Empty list
((OPTION_B))

Empty pointer field of the structure


((OPTION_C))

All of above
((OPTION_D))

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) The function that return memory to heap is called...........

Allloc()
((OPTION_A))

Malloc()
((OPTION_B))

Calloc()
((OPTION_C))

Free()
((OPTION_D))

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)
((MARKS)) (1/2/3...) 1

((QUESTION)) Two main measures for the efficiency of an algorithm are

((OPTION_A)) Processor and memory

((OPTION_B)) Complexity and capacity

((OPTION_C)) Time and space

((OPTION_D)) Data and space

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1
((QUESTION)) Which of the following case does not exist in complexity theory

((OPTION_A)) Best case

Worst case
((OPTION_B))

((OPTION_C)) Average case

((OPTION_D)) Null case

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1
The Worst case occur in linear search algorithm when
((QUESTION))

((OPTION_A)) Item is somewhere in the middle of the array

((OPTION_B)) Item is not in the array at all


((OPTION_C)) Item is the last element in the array

((OPTION_D)) Item is the last element in the array or is not there at all

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION)) .
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) The complexity of merge sort algorithm is

((OPTION_A)) O(n)

((OPTION_B)) O(log n)

((OPTION_C)) O(n2)

((OPTION_D)) O(n log n)

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) The input to a merge sort is 6,5,4,3,2,1 and the same input is applied to
quick sort then which is the best algorithm in this case

Merge sort
((OPTION_A))

((OPTION_B)) Quick sort

((OPTION_C)) Both have same time complexity in this case as they have same running
time
((OPTION_D)) Cannot be decided

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1
If there exists two functions f(n) and g(n). The constant c>0 and there exists
((QUESTION))
an integer constant n0>=1. If f(n)<=c*g(n) for every integer n>= n0 then we
say that____
f(n)=O(g(n))
((OPTION_A))
f(n)=Θ (g(n))
((OPTION_B))

((OPTION_C)) f(n)=𝛺 (g(n))


f(n)=Θ (g(n)) f(n)=o(g(n))

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION)) Basic definition of big oh notation


(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) In practice ______ is used to define tight upper bound on growth of


function f(n)

((OPTION_A)) Big oh

((OPTION_B)) Big omega

((OPTION_C)) Big theta

((OPTION_D)) None of these

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION)) The definition of big oh notation is f(n)<=c*g(n) which defines the


(OPTIONAL) upper bound on growth of the function f(n)
((MARKS)) (1/2/3...) 1

((QUESTION)) Examples of O(1) are ______

((OPTION_A)) Multiplying two numbers

((OPTION_B)) Assigning some value to a variable

((OPTION_C)) Displaying some integer on console

((OPTION_D)) All of the above

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION)) All these operations are computed by single line expression


(OPTIONAL) evaluation

((MARKS)) (1/2/3...) 1

((QUESTION)) Examples of O(n2) algorithms are

((OPTION_A)) Adding two matrices

((OPTION_B)) Finding transpose of a matrix

((OPTION_C)) Initializing all elements of the matrix by 0

((OPTION_D)) All of the above

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION)) Within two for loops(nested), all these operations are performed.
(OPTIONAL)

((MARKS)) (1/2/3...) 1
Choose the correct time complexity of following code__
((QUESTION))
while(n>0)
{
n=n/10
}
O(1)
((OPTION_A))
O(n)
((OPTION_B))
O(log n)
((OPTION_C))

((OPTION_D)) O(n2)

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

The time complexity of binary search is_____


((QUESTION))
O(n)
((OPTION_A))
O(log n)
((OPTION_B))
O(n log n)
((OPTION_C))

((OPTION_D)) O(n2)

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION)) The list is divided at the mid and then the element is searched in
(OPTIONAL) either left half or right half.

((MARKS)) (1/2/3...) 1

((QUESTION)) Consider recurrence relation as


T(0)=c1
T(n)=T(n-1)+c2
This can be expressed as
O(n)
((OPTION_A))
O(log n)
((OPTION_B))
O(n log n)
((OPTION_C))

((OPTION_D)) O(n2)

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION)) T(n)=T(n-1)+c2
(OPTIONAL) =T(n-2)+2c2
=T(n-3)+3c2
=T(n-k)+kc2
If k=n then T(n)=c1+nc2 Hence, T(n)=O(n)

((MARKS)) (1/2/3...) 1

((QUESTION)) Consider recurrence relation as


T(0)=c1 and T(1)=c2
T(n)=T(n/2)+c3
This can be expressed as
O(n)
((OPTION_A))
O(log n)
((OPTION_B))
O(n log n)
((OPTION_C))

((OPTION_D)) O(n2)

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Following is the method of solving recurrence relation

((OPTION_A)) Greedy method


((OPTION_B)) Backtracking

((OPTION_C)) Forward substitution method

((OPTION_D)) Divide and Conquer method

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1
The recurrence relation for factorial function is of the form _______
((QUESTION))

((OPTION_A)) T(n)=T(n-1)+c

((OPTION_B)) T(n)=T(n-1)+T(n-2)+c

((OPTION_C)) T(n/2)+c

((OPTION_D)) None of these

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION)) The factorial function is as follows-


(OPTIONAL) fact(n)
{
if n=1
return 1
else
return n * fact(n-1)
}

((MARKS)) (1/2/3...) 1

((QUESTION)) The recurrence relation for fibonacci function is of the form _______

((OPTION_A)) T(n)=T(n-1)+c

((OPTION_B)) T(n)=T(n-1)+T(n-2)+c
((OPTION_C)) T(n/2)+c

((OPTION_D)) None of these

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION)) The fibonacci function is as follows-


(OPTIONAL) fibb(n)
{
if n = = 0
return 0
if n = = 1
return 1
else
return (fibb(n-1) + fibb(n-2))
}

((MARKS)) (1/2/3...) 1

((QUESTION)) The frequency count of following code is____


for(i=0;i<m;i++)
{
for(j=0;i<n;j++)
{
C[i][j]=a[i][j]+b[i][j];
}
}

((OPTION_A)) m + mn + mn

((OPTION_B)) m + n + mn

((OPTION_C)) m + n2 + mn

((OPTION_D)) (m+1) + m(n+1) + mn

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)
((MARKS)) (1/2/3...) 1

((QUESTION)) Consider T(n)=15n3 + n2 + 4. Select the correct statement

((OPTION_A)) T(n)=O(n4)

((OPTION_B)) T(n)=𝛺 (n3)

((OPTION_C)) T(n)=𝛺 (n2)

((OPTION_D)) All of the above

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Give the frequency count of 3rd Statement

for(i=1;i<=n;i++)
for(j=1;j<=i;j++)
x=x+1;

((OPTION_A)) ½(n2+n)

((OPTION_B)) ½(n2+3n)

((OPTION_C)) n2

((OPTION_D)) (n+1)2

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) There are four algorithms for solving a problem. Their time complexities
are O(n), O(n2), O(log n) and O(n log n). Which is the best algorithm?

((OPTION_A)) O(n)

((OPTION_B)) O(n2)

((OPTION_C)) O(log n)

((OPTION_D)) O(n log n)

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) The order of the recurrence relation ar-7ar-1+10ar-2=0 is ______.

((OPTION_A)) 3

((OPTION_B)) 2

((OPTION_C)) 1

((OPTION_D)) B

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Characteristic roots of the recurrence relation ar-2ar-1+ar-2=0 are _______

((OPTION_A)) 1, -1

((OPTION_B)) -1, -1

((OPTION_C)) 1, 1
((OPTION_D)) None of these

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Charactristic polynomial of the recurrence relation bn=-3bn-1-bn-2 is


________.

((OPTION_A)) Z2-3Z-2=0

((OPTION_B)) Z2+3Z-2=0

((OPTION_C)) Z2+3Z+2=0

((OPTION_D)) None of these

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) The general solution of the recurrence relation ar-2ar-1=0 is _____.

((OPTION_A)) ar=c1(-2)r

((OPTION_B)) ar=c2(2)r

((OPTION_C)) ar=c1(1)r

((OPTION_D)) None of these

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Consider the recurrence relation, an=an-1+2an-2 with a9=3 and a10=5. Find a7.

((OPTION_A)) 1

((OPTION_B)) 3

((OPTION_C)) 5

((OPTION_D)) None

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Charactristic polynomial of the recurrence relation ar+2-ar-2=0 is ______.

((OPTION_A)) Z-1=0

((OPTION_B)) Z2-1=0

((OPTION_C)) (Z-1)2=0

((OPTION_D)) None

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION)) Given homogeneous recurrence relation can be written as


(OPTIONAL) ar+2+0ar+1+0ar+0ar-1-ar-2=0
Order of this recurrence relation is 4.
Hence characteristic polynomial is Z4-1=0
((MARKS)) (1/2/3...) 1

((QUESTION)) The postfix equivalent of the prefix *+ab-cd is ______.

((OPTION_A)) ab+cd-*

((OPTION_B)) ab+cd*-

((OPTION_C)) abcd+*-

((OPTION_D)) ab-cd+*

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) What does the following function check for? (all necessary headers to
be included and function is called from main)

#define MAX 10

typedef struct stack


{
int top;
int item[MAX];
}stack;

int function(stack *s)


{
if(s->top == -1)
return 1;
else return 0;
}

full stack
((OPTION_A))
invalid index
((OPTION_B))
empty stack
((OPTION_C))

((OPTION_D)) infinite stack


((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION)) Answer: c
(OPTIONAL) Explanation: An empty stack is represented with the top-of-the-stack(‘top’
in this case) to be equal to -1.
MCQs

Suppose we are sorting an array of eight integers using a some quadratic sorting
algorithm. After four iterations of the algorithm’s main loop, the array elements are
ordered as shown here:2 4 5 7 8 1 3 6 *
Insertion sort
Selection sort
either of a and b
none of the above

The running time of insertion sort is *


O(n^2)
O(n)
O(log n)
O(n log n)

Which of the following sorting procedure is the slowest ? *


Quick sort
Heap sort
Shell sort
Bubble sort

A sort which compares adjacent elements in a list and switches where necessary is *
insertion sort
heap sort
quick sort
bubble sort

The correct order of the efficiency of the following sorting algorithms according to their
overall running time comparision is *
Insertion>selection>bubble
Insertion>bubble>selection
Selection>bubble>insertion
bubble>selection>insertion

A sort which iteratively passes through a list to exchange the first element with any
element less than it and then repeats with a new first element is called *
insertion sort
selection sort
heap sort
quick sort
The number of swappings needed to sort the numbers 8, 22, 7, 9, 31, 19, 5, 13 in
ascending order, using bubble sort is *
10
9
13
14

The way a card game player arranges his cards as he picks them one by one can be
compared to *
Quick sort
Merge sort
Insertion sort
Bubble sort

Which among the following is the best when the list is already sorted *
Insertion sort
Bubble sort
Merge sort
Selection sort

As part of the maintenance work, you are entrusted with the work of rearranging the
library books in a shelf in proper order, at the end of each day. The ideal choice will
be *
Bubble sort
Insertion sort
Selection sort
Merge sort
MCQs

1. Which of these best describes an array?


a) A data structure that shows a hierarchical behavior
b) Container of objects of similar types
c) Container of objects of mixed types
d) All of the mentioned
Answer: b
Explanation: Array contains elements only of the same type.

2. How do you initialize an array in C?


a) int arr[3] = (1,2,3);
b) int arr(3) = {1,2,3};
c) int arr[3] = {1,2,3};
d) int arr(3) = (1,2,3);
Answer: c
Explanation: This is the syntax to initialize an array in C.

3. How do you instantiate an array in Java?


a) int arr[] = new int(3);
b) int arr[];
c) int arr[] = new int[3];
d) int arr() = new int(3);
Answer: c
Explanation: Note that option b is declaration whereas option c is to instantiate an array.

4. Which of the following is a correct way to declare a multidimensional array in Java?


a) int[][] arr;
b) int arr[][];
c) int []arr[];
d) All of the mentioned
Answer: d
Explanation: All the options are syntactically correct.

5. What is the output of the following piece of code?

public class array


{
public static void main(String args[])
{
int []arr = {1,2,3,4,5};
System.out.println(arr[2]);
System.out.println(arr[4]);
}
}

a) 3 and 5
b) 5 and 3
c) 2 and 4
d) 4 and 2
Answer: a
Explanation: Array indexing starts from 0.

6. What is the output of the following piece of code?

public class array


{
public static void main(String args[])
{
int []arr = {1,2,3,4,5};
System.out.println(arr[5]);
}
}

a) 4
b) 5
c) ArrayIndexOutOfBoundsException
d) InavlidInputException
Answer: c
Explanation: Trying to access an element beyond the limits of an array gives
ArrayIndexOutOfBoundsException.

7. When does the ArrayIndexOutOfBoundsException occur?


a) Compile-time
b) Run-time
c) Not an error
d) None of the mentioned
Answer: b
Explanation: ArrayIndexOutOfBoundsException is a run-time exception and the compilation is
error-free.

8. Which of the following concepts make extensive use of arrays?


a) Binary trees
b) Scheduling of processes
c) Caching
d) Spatial locality
Answer: d
Explanation: Whenever a particular memory location is referred, it is likely that the locations
nearby are also referred, arrays are stored as contigous blocks in memory, so if you want to
access array elements, spatial locality makes it to access quickly.

9. What are the advantages of arrays?


a) Easier to store elements of same data type
b) Used to implement other data structures like stack and queue
c) Convenient way to represent matrices as a 2D array
d) All of the mentioned
Answer: d
Explanation: Arrays are simple to implement when it comes to matrices of fixed size and type, or
to implement other data structures.

10. What are the disadvantages of arrays?


a) We must know before hand how many elements will be there in the array
b) There are chances of wastage of memory space if elements inserted in an array are lesser than
than the allocated size
c) Insertion and deletion becomes tedious
d) All of the mentioned
Answer: d
Explanation: Arrays are of fixed size, hence during the compile time we should know its size and
type, since arrays are stored in contigous locations, insertion and deletion becomes time
consuming.

11. Assuming int is of 4bytes, what is the size of int arr[15];?


a) 15
b) 19
c) 11
d) 60
Answer: d
Explanation: Since there are 15 int elements and each int is of 4bytes, we get 15*4 = 60bytes.

Queues:

1. A linear list of elements in which deletion can be done from one end (front) and insertion can
take place only at the other end (rear) is known as a ?
a) Queue
b) Stack
c) Tree
d) Linked list
Answer: a
Explanation: Self Explanatory.

3. A queue is a ?
a) FIFO (First In First Out) list
b) LIFO (Last In First Out) list
c) Ordered array
d) Linear tree
View Answer

Answer: a
Explanation: Self Explanatory.

4. In Breadth First Search of Graph, which of the following data structure is used?
a) Stack
b) Queue
c) Linked list
d) None of the mentioned
View Answer

Answer: b
Explanation: Self Explanatory.

5. If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in
what order will they be removed?
a) ABCD
b) DCBA
c) DCAB
d) ABCD
Answer: a
Explanation: Queue follows FIFO approach.

6. A data structure in which elements can be inserted or deleted at/from both the ends but not in
the middle is?
a) Queue
b) Circular queue
c) Dequeue
d) Priority queue
Answer: c
Explanation: Self Explanatory.

7. A normal queue, if implemented using an array of size MAX_SIZE, gets full when
a) Rear = MAX_SIZE – 1
b) Front = (rear + 1)mod MAX_SIZE
c) Front = rear + 1
d) Rear = front
Answer: a
Explanation: Condition for size of queue.

8. Queues serve major role in


a) Simulation of recursion
b) Simulation of arbitrary linked list
c) Simulation of limited resource allocation
d) All of the mentioned
Answer: c
Explanation: Rest all are implemented using other data structures.

9. Which of the following is not the type of queue?


a) Ordinary queue
b) Single ended queue
c) Circular queue
d) Priority queue
Answer: b
Explanation: Queue always has two ends.

10. In linked list implementation of queue, if only front pointer is maintained, which of the
following operation take worst case linear time?
a) Insertion
b) Deletion
c) To empty a queue
d) Both a and c
Answer: d
Explanation: Since front pointer is used for deletion, so worst time for the other two cases.

11. In linked list implementation of a queue, where does a new element be inserted?
a) At the head of link list
b) At the centre position in the link list
c) At the tail of the link list
d) None of the mentioned
Answer: c
Explanation: Since queue follows FIFO so new element inserted at last.

12. In linked list implementation of a queue, front and rear pointers are tracked. Which of these
pointers will change during an insertion into a NONEMPTY queue?
a) Only front pointer
b) Only rear pointer
c) Both front and rear pointer
d) None of the mentioned
Answer: b
Explanation: Since queue follows FIFO so new element inserted at last.
((MARKS)) (1/2/3...) 1

((QUESTION)) What will be the output of the program ?


#include<stdio.h>

int main()
{
int a[5] = {5, 1, 15, 20, 25};
int i, j, m;
i = ++a[1];
j = a[1]++;
m = a[i++];
printf("%d, %d, %d", i, j, m);
return 0;
}

((OPTION_A)) 2,1,15

((OPTION_B)) 1,2,5

((OPTION_C)) 3,2,15

((OPTION_D)) 2,3,20

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION)) Step 1: int a[5] = {5, 1, 15, 20, 25}; The variable arr is declared as an
(OPTIONAL) integer array with a size of 5 and it is initialized to
a[0] = 5, a[1] = 1, a[2] = 15, a[3] = 20, a[4] = 25 .
Step 2: int i, j, m; The variable i,j,m are declared as an integer type.
Step 3: i = ++a[1]; becomes i = ++1; Hence i = 2 and a[1] = 2
Step 4: j = a[1]++; becomes j = 2++; Hence j = 2 and a[1] = 3.
Step 5: m = a[i++]; becomes m = a[2]; Hence m = 15 and i is
incremented by 1(i++ means 2++ so i=3)
Step 6: printf("%d, %d, %d", i, j, m); It prints the value of the
variables i, j, m
Hence the output of the program is 3, 2, 15

((MARKS)) (1/2/3...) 1
((QUESTION)) In C, if you pass an array as an argument to a function, what actually gets
passed?
((OPTION_A)) Value of elements in array
First element of the array
((OPTION_B))

((OPTION_C)) Base address of the array

((OPTION_D)) Address of the last element of array

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION)) The statement 'C' is correct. When we pass an array as a funtion


(OPTIONAL) argument, the base address of the array will be passed.

((MARKS)) (1/2/3...) 1
Which of the following statements are correct about 6 used in the
((QUESTION))
program?
int num[6];
num[6]=21;
((OPTION_A)) In the first statement 6 specifies a particular element, whereas in the
second statement it specifies a type.
((OPTION_B)) In the first statement 6 specifies a array size, whereas in the second
statement it specifies a particular element of array.

((OPTION_C)) In the first statement 6 specifies a particular element, whereas in the


second statement it specifies a array size.
((OPTION_D)) In both the statement 6 specifies array size.

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION)) The statement 'B' is correct, because int num[6]; specifies the size of
(OPTIONAL) array and num[6]=21; designates the particular element(7thelement) of
the array.

((MARKS)) (1/2/3...) 1

((QUESTION)) What does the following declaration mean?


int (*ptr)[10];

((OPTION_A)) ptr is array of pointers to 10 integers

((OPTION_B)) ptr is a pointer to an array of 10 integers

((OPTION_C)) ptr is an array of 10 integers

((OPTION_D)) ptr is an pointer to array


((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Which of the following statements are correct about an array?


1. The array int num[26]; can store 26 elements.
2. The expression num[1] designates the very first element in the
array.
3. It is necessary to initialize the array at the time of declaration.
4. The declaration num[SIZE] is allowed if SIZE is a macro.
1
((OPTION_A))

1,4
((OPTION_B))

2,3
((OPTION_C))

2,4
((OPTION_D))

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION)) 1. The array int num[26]; can store 26 elements. This statement is
(OPTIONAL) true.
2. The expression num[1] designates the very first element in the
array. This statement is false, because it designates the second
element of the array.
3. It is necessary to initialize the array at the time of declaration. This
statement is false.
4. The declaration num[SIZE] is allowed if SIZE is a macro. This
statement is true, because the MACRO just replaces the symbol SIZE
with given value.
Hence the statements '1' and '4' are correct statements.
((MARKS)) (1/2/3...) 1

((QUESTION)) If the two strings are identical, then strcmp() function returns
-1
((OPTION_A))

1
((OPTION_B))

0
((OPTION_C))

Yes
((OPTION_D))

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION)) strcmp(const char *s1, const char*s2);


(OPTIONAL) The strcmp return an int value that is
if s1 < s2 returns a value < 0
if s1 == s2 returns 0
if s1 > s2 returns a value > 0

((MARKS)) (1/2/3...) 1

((QUESTION)) Which of the following function is used to find the first occurrence of a
given string in another string?

((OPTION_A)) strchr()

((OPTION_B)) strrchr()

((OPTION_C)) strstr()

((OPTION_D)) strnset()

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION)) char *strstr(const char *s1, const char *s2);


(OPTIONAL) Return Value:
On success, strstr returns a pointer to the element
in s1 where s2 begins (points to s2 in s1).
On error (if s2 does not occur in s1), strstr returns null.
Example:
#include <stdio.h>
#include <string.h>
int main(void)
{
char *str1 = "IndiaBIX", *str2 = "ia", *ptr;
ptr = strstr(str1, str2);
printf("The substring is: %s\n", ptr);
return 0;
}
Output: The substring is: iaBIX

((MARKS)) (1/2/3...) 1

((QUESTION)) The library function used to find the last occurrence of a character in a
string is

((OPTION_A)) strnstr()

((OPTION_B)) laststr()

((OPTION_C)) strrchr()

((OPTION_D)) strstr()

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION)) Declaration: char *strrchr(const char *s, int c);


(OPTIONAL) It scans a string s in the reverse direction, looking for a specific
character c.
Example:
#include <string.h>
#include <stdio.h>

int main(void)
{
char text[] = "I learn through IndiaBIX.com";
char *ptr, c = 'i';
ptr = strrchr(text, c);
if (ptr)
printf("The position of '%c' is: %d\n", c, ptr-text);
else
printf("The character was not found\n");
return 0;
}
Output:
The position of 'i' is: 19

((MARKS)) (1/2/3...) 1

((QUESTION)) How will you print \n on the screen?

((OPTION_A)) printf("\n");

((OPTION_B)) echo "\\n";

((OPTION_C)) printf('\n');

((OPTION_D)) printf("\\n");

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION)) The statement printf("\\n"); prints '\n' on the screen.


(OPTIONAL)

((MARKS)) (1/2/3...) 1
Which of the following data structures cannot store non-homogeneous
((QUESTION))
elements?

Arrays
((OPTION_A))

Structure
((OPTION_B))

Linked List
((OPTION_C))
File
((OPTION_D))

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1
In arrays ____ and _____ are costly but ____ is easy operation
((QUESTION))

Searching, insertion, deletion


((OPTION_A))

Insertion, deletion, searching


((OPTION_B))

Deletion, searching, insertion


((OPTION_C))

None of these
((OPTION_D))

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1
void main()
((QUESTION))
{
int a[5]={1,2};
printf(“\n%d%d%d”,a[2],a[3],a[4]);
}
What will be the output?
122
((OPTION_A))
211
((OPTION_B))

000
((OPTION_C))

((OPTION_D)) Garbage Value

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Find the output:


void main()
{
int i=0,a[3];
a[i]=i++;
printf(“%d”,a[i]);
}

((OPTION_A)) 0

((OPTION_B)) 1

((OPTION_C)) Garbage value

((OPTION_D)) Syntax error

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) While passing the array as actual argument, the function call must have
array name_____

((OPTION_A)) alone
((OPTION_B)) With empty braces

((OPTION_C)) With its size

((OPTION_D)) None of these

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Which code will run faster?


1. for(i=0;i<100;i++)
for(j=0;j<10;j++)
a[i][j]=0;
2. for(i=0;i<10;i++)
for(j=0;j<100;j++)
a[i][j]=0;

((OPTION_A)) Code 1

((OPTION_B)) Code 2

((OPTION_C)) Both run equally

((OPTION_D)) None of these

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Consider an integer array int arr[4][5]. If base address is 1020, find the
ess of element arr[3][4] with row major representation. Size of int is 2 bytes.

((OPTION_A)) 1020

((OPTION_B)) 1038

((OPTION_C)) 1039
((OPTION_D)) 1058

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Consider the statement int Val[2][4]={1,2,3,4,5,6,7,8}. The element 4 will


be at____

((OPTION_A)) Val[0][3]

((OPTION_B)) Val[0][4]

((OPTION_C)) Val[1][1]

((OPTION_D)) None of these

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1
void main()
((QUESTION))
{
int a[2][3]={2,3};
printf(“\n%d%d%d%d”,a[0][0],a[0][1],a[1][0],a[1][1]);
}
What will be the output?
((OPTION_A)) 0023

((OPTION_B)) 2300

((OPTION_C)) 2030

((OPTION_D)) 2003

((CORRECT_CHOICE)) B
(A/B/C/D)
((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) The getchar() library function returns________

((OPTION_A)) Character when any key is pressed

((OPTION_B)) Character when enter key is pressed

((OPTION_C)) Display character on the screen when any key is pressed

((OPTION_D)) None of these

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Find the output:


void main()
{
printf(“%c”,100);
}

((OPTION_A)) Prints 100

((OPTION_B)) Prints ASCII equivalent of 100

((OPTION_C)) Prints garbage value

((OPTION_D)) Syntax error

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)
((MARKS)) (1/2/3...) 1

((QUESTION)) Which of the foolowing is more appropriate for reading a multi-word


string?

((OPTION_A)) printf

((OPTION_B)) scanf

((OPTION_C)) put

((OPTION_D)) gets

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Find the output:


int main()
{
char p[]=”%c\n”;
p[1]=’d’;
printf(p,65);
return 0;
}

((OPTION_A)) a

((OPTION_B)) A

((OPTION_C)) c

((OPTION_D)) 65

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1
((QUESTION)) Sparse matrix have______

((OPTION_A)) Many zero entries

((OPTION_B)) Many non zero entries

((OPTION_C)) High dimension

((OPTION_D)) Many negative entries

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) The sequential representation of sparse matrix is given by

((OPTION_A)) stack

((OPTION_B)) Queues

((OPTION_C)) Arrays

((OPTION_D)) Linked List

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) If polynomial is 5x^3+3x^2+10x+2, the degree is

((OPTION_A)) 3

((OPTION_B)) 2

((OPTION_C)) 1

((OPTION_D)) 0

((CORRECT_CHOICE)) A
(A/B/C/D)
((EXPLANATION))
(OPTIONAL)
((MARKS)) (1/2/3...) 1

((QUESTION)) Two main measures for the efficiency of an algorithm are

((OPTION_A)) Processor and memory

((OPTION_B)) Complexity and capacity

((OPTION_C)) Time and space

((OPTION_D)) Data and space

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1
((QUESTION)) Which of the following case does not exist in complexity theory

((OPTION_A)) Best case

Worst case
((OPTION_B))

((OPTION_C)) Average case

((OPTION_D)) Null case

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1
The Worst case occur in linear search algorithm when
((QUESTION))

((OPTION_A)) Item is somewhere in the middle of the array

((OPTION_B)) Item is not in the array at all

((OPTION_C)) Item is the last element in the array

((OPTION_D)) Item is the last element in the array or is not there at all
((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION)) .
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) The complexity of merge sort algorithm is

((OPTION_A)) O(n)

((OPTION_B)) O(log n)

((OPTION_C)) O(n2)

((OPTION_D)) O(n log n)

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) The input to a merge sort is 6,5,4,3,2,1 and the same input is applied to
quick sort then which is the best algorithm in this case

Merge sort
((OPTION_A))

((OPTION_B)) Quick sort

((OPTION_C)) Both have same time complexity in this case as they have same running
time
((OPTION_D)) Cannot be decided

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1
If there exists two functions f(n) and g(n). The constant c>0 and there exists
((QUESTION))
an integer constant n0>=1. If f(n)<=c*g(n) for every integer n>= n0 then we
say that____
f(n)=O(g(n))
((OPTION_A))
f(n)=Θ (g(n))
((OPTION_B))

((OPTION_C)) f(n)= (g(n))


f(n)=Θ (g(n)) f(n)=o(g(n))

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION)) Basic definition of big oh notation


(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) In practice ______ is used to define tight upper bound on growth of


function f(n)

((OPTION_A)) Big oh

((OPTION_B)) Big omega

((OPTION_C)) Big theta

((OPTION_D)) None of these

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION)) The definition of big oh notation is f(n)<=c*g(n) which defines the


(OPTIONAL) upper bound on growth of the function f(n)

((MARKS)) (1/2/3...) 1

((QUESTION)) Examples of O(1) are ______

((OPTION_A)) Multiplying two numbers

((OPTION_B)) Assigning some value to a variable

((OPTION_C)) Displaying some integer on console

((OPTION_D)) All of the above


((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION)) All these operations are computed by single line expression


(OPTIONAL) evaluation

((MARKS)) (1/2/3...) 1

((QUESTION)) Examples of O(n2) algorithms are

((OPTION_A)) Adding two matrices

((OPTION_B)) Finding transpose of a matrix

((OPTION_C)) Initializing all elements of the matrix by 0

((OPTION_D)) All of the above

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION)) Within two for loops(nested), all these operations are performed.
(OPTIONAL)

((MARKS)) (1/2/3...) 1
Choose the correct time complexity of following code__
((QUESTION))
while(n>0)
{
n=n/10
}

O(1)
((OPTION_A))
O(n)
((OPTION_B))
O(log n)
((OPTION_C))

((OPTION_D)) O(n2)

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)
((MARKS)) (1/2/3...) 1
The time complexity of binary search is_____
((QUESTION))
O(n)
((OPTION_A))
O(log n)
((OPTION_B))
O(n log n)
((OPTION_C))

((OPTION_D)) O(n2)

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION)) The list is divided at the mid and then the element is searched in
(OPTIONAL) either left half or right half.

((MARKS)) (1/2/3...) 1

((QUESTION)) Consider recurrence relation as


T(0)=c1
T(n)=T(n-1)+c2
This can be expressed as
O(n)
((OPTION_A))
O(log n)
((OPTION_B))
O(n log n)
((OPTION_C))

((OPTION_D)) O(n2)

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION)) T(n)=T(n-1)+c2
(OPTIONAL) =T(n-2)+2c2
=T(n-3)+3c2
=T(n-k)+kc2
If k=n then T(n)=c1+nc2 Hence, T(n)=O(n)
((MARKS)) (1/2/3...) 1

((QUESTION)) Consider recurrence relation as


T(0)=c1 and T(1)=c2
T(n)=T(n/2)+c3
This can be expressed as
O(n)
((OPTION_A))
O(log n)
((OPTION_B))
O(n log n)
((OPTION_C))

((OPTION_D)) O(n2)

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Following is the method of solving recurrence relation

((OPTION_A)) Greedy method

((OPTION_B)) Backtracking

((OPTION_C)) Forward substitution method

((OPTION_D)) Divide and Conquer method

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1
The recurrence relation for factorial function is of the form _______
((QUESTION))

((OPTION_A)) T(n)=T(n-1)+c

((OPTION_B)) T(n)=T(n-1)+T(n-2)+c
((OPTION_C)) T(n/2)+c

((OPTION_D)) None of these

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION)) The factorial function is as follows-


(OPTIONAL) fact(n)
{
if n=1
return 1
else
return n * fact(n-1)
}

((MARKS)) (1/2/3...) 1

((QUESTION)) The recurrence relation for fibonacci function is of the form _______

((OPTION_A)) T(n)=T(n-1)+c

((OPTION_B)) T(n)=T(n-1)+T(n-2)+c

((OPTION_C)) T(n/2)+c

((OPTION_D)) None of these

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION)) The fibonacci function is as follows-


(OPTIONAL) fibb(n)
{
if n = = 0
return 0
if n = = 1
return 1
else
return (fibb(n-1) + fibb(n-2))
}

((MARKS)) (1/2/3...) 1

((QUESTION)) The frequency count of following code is____


for(i=0;i<m;i++)
{
for(j=0;i<n;j++)
{
C[i][j]=a[i][j]+b[i][j];
}
}

((OPTION_A)) m + mn + mn

((OPTION_B)) m + n + mn

((OPTION_C)) m + n2 + mn

((OPTION_D)) (m+1) + m(n+1) + mn

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Consider T(n)=15n3 + n2 + 4. Select the correct statement

((OPTION_A)) T(n)=O(n4)

((OPTION_B)) T(n)= (n3)

((OPTION_C)) T(n)= (n2)

((OPTION_D)) All of the above

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Give the frequency count of 3rd Statement

for(i=1;i<=n;i++)

for(j=1;j<=i;j++)

x=x+1;
((OPTION_A)) ½(n2+n)

((OPTION_B)) ½(n2+3n)

((OPTION_C)) n2

((OPTION_D)) (n+1)2

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) There are four algorithms for solving a problem. Their time complexities
are O(n), O(n2), O(log n) and O(n log n). Which is the best algorithm?

((OPTION_A)) O(n)

((OPTION_B)) O(n2)

((OPTION_C)) O(log n)

((OPTION_D)) O(n log n)

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) The order of the recurrence relation ar-7ar-1+10ar-2=0 is ______.

((OPTION_A)) 3

((OPTION_B)) 2

((OPTION_C)) 1

((OPTION_D)) B

((CORRECT_CHOICE)) D
(A/B/C/D)
((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Characteristic roots of the recurrence relation ar-2ar-1+ar-2=0 are _______

((OPTION_A)) 1, -1

((OPTION_B)) -1, -1

((OPTION_C)) 1, 1

((OPTION_D)) None of these

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Charactristic polynomial of the recurrence relation bn=-3bn-1-bn-2 is


________.

((OPTION_A)) Z2-3Z-2=0

((OPTION_B)) Z2+3Z-2=0

((OPTION_C)) Z2+3Z+2=0

((OPTION_D)) None of these

((CORRECT_CHOICE)) C
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) The general solution of the recurrence relation ar-2ar-1=0 is _____.

((OPTION_A)) ar=c1(-2)r
((OPTION_B)) ar=c2(2)r

((OPTION_C)) ar=c1(1)r

((OPTION_D)) None of these

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Consider the recurrence relation, an=an-1+2an-2 with a9=3 and a10=5. Find a7.

((OPTION_A)) 1

((OPTION_B)) 3

((OPTION_C)) 5

((OPTION_D)) None

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) Charactristic polynomial of the recurrence relation ar+2-ar-2=0 is ______.

((OPTION_A)) Z-1=0

((OPTION_B)) Z2-1=0

((OPTION_C)) (Z-1)2=0

((OPTION_D)) None

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION)) Given homogeneous recurrence relation can be written as


(OPTIONAL) ar+2+0ar+1+0ar+0ar-1-ar-2=0
Order of this recurrence relation is 4.
Hence characteristic polynomial is Z4-1=0

((MARKS)) (1/2/3...) 1

((QUESTION)) Which of the following is not a homogeneous linear recurrence relation

((OPTION_A)) ar+2-ar-2=0

((OPTION_B)) ar=ar-1+ar-2

((OPTION_C)) ar-2ar-1=-ar-2

((OPTION_D)) ar+3+6ar+2.ar+1-4ar=0

((CORRECT_CHOICE)) D
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) If 4 and -1 are the characteristic roots of the recurrence relation then its
homogeneous solution becomes _______

((OPTION_A)) ar=c1(-1)r+c2(4)r

((OPTION_B)) ar=c0(-1)r+c2

((OPTION_C)) ar=(c1+c2.r)(-1)r

((OPTION_D)) None

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)
((MARKS)) (1/2/3...) 1

((QUESTION)) A recurrence relation of degree 1 is called ______.

((OPTION_A)) Linear

((OPTION_B)) Homogeneous

((OPTION_C)) Quadratic

((OPTION_D)) None

((CORRECT_CHOICE)) A
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

((MARKS)) (1/2/3...) 1

((QUESTION)) The generating function for the sequence 1, a, a2, a3, ….. is ______

((OPTION_A)) 1/(1-z)

((OPTION_B)) 1/(1-az)

((OPTION_C)) 1/(1+az)

((OPTION_D)) None

((CORRECT_CHOICE)) B
(A/B/C/D)

((EXPLANATION))
(OPTIONAL)

You might also like