Font size
S
M
L
XL
WorksheetsDSC II Intermediate
Total questions: 109
Worksheet time: 2hrs 49mins
Name
Class
Date
1.
The process of calling a function by address is known as __________
a)
Call by Reference
b)
Call by value
c)
Array of pointers
d)
Pointer
2.
The process of calling a function by value is known as __________
a)
Call by Reference
b)
Call by value
c)
Array of pointers
d)
Pointer
3.
While passing an address to a function, the receiving parameters should be __________
a)
Structures
b)
Pointers
c)
Arrays
d)
Constants
4.
The __________ statement is necessary only when the function is returning some data back to the calling function.
a)
return
b)
void
c)
NULL
d)
break
5.
A __________ is a collection of data items under one name.
a)
structure
b)
union
c)
enum
d)
array
6.
The___________Operator is used to access the members of the structure
a)
Dot
b)
AND
c)
OR
d)
NOT
7.
A pointer is a ___________data type.
a)
Integer
b)
Character
c)
Derived
d)
Float
8.
The ____________ operator is used to get the address of the variable
a)
&
b)
*
c)
sizeof
d)
dot
9.
The other name for Indirection operator is known as ________
a)
Dereferencing
b)
Multiple Indirection
c)
AND
d)
Conditional operator
10.
In pointer, asterisk is known as ____________operator
a)
Indirection operator
b)
Conditional operator
c)
Multiple Indirection
d)
AND
11.
The ___________ pointer is a generic pointer that can represent any pointer type.
a)
Integer
b)
Character
c)
void
d)
NULL
12.
A variable P is called pointer if
a)
P contains NULL
b)
P stores data
c)
P store garbage values
d)
If P declared and preceded by *
13.
The double pointer is used to store the address of ___________
a)
Variable
b)
Pointer variable
c)
integer
d)
local variables
14.
The __________ is a variable which stores the address of another variable
a)
Integer
b)
Pointer
c)
Float
d)
Real
15.
The Function ___________ is used in C to de-allocate the allocated block of memory
a)
calloc()
b)
malloc()
c)
free()
d)
realloc()
16.
Not a memory management function in C
a)
calloc()
b)
malloc()
c)
free()
d)
new()
17.
Memory function __________is used to release the previously allocated space
a)
calloc()
b)
malloc()
c)
free()
d)
realloc()
18.
The process of allocating memory at run time is called __________
a)
Queue
b)
Static
c)
Dynamic
d)
Compile
19.
The function __________ is used to allocate multiple block of memory
a)
calloc()
b)
malloc()
c)
free()
d)
realloc()
20.
The function __________ is used to reallocate the already allocated memory
a)
calloc()
b)
malloc()
c)
free()
d)
realloc()
21.
The function __________ is used to allocate a single block of memory
a)
calloc()
b)
malloc()
c)
free()
d)
realloc()
22.
The function __________ allocates request size of bytes and returns a pointer to the first byte of the allocated space.
a)
calloc()
b)
malloc()
c)
free()
d)
realloc()
23.
The function __________ allocates space for an array of elements, initializes them to zero and then returns a pointer to the memory
a)
calloc()
b)
malloc()
c)
free()
d)
realloc()
24.
The function __________ frees previously allocated space
a)
calloc()
b)
malloc()
c)
free()
d)
realloc()
25.
The function __________ modifies the size of previously allocated space
a)
calloc()
b)
malloc()
c)
free()
d)
realloc()
26.
Adding an element to the stack means __________
a)
Placing an element at the front end
b)
Placing an element at the top
c)
Placing an element at the rear end
d)
Placing an element at the bottom end
27.
Pushing an element to the stack means __________
a)
Removing an element from the stack
b)
Searching a given element in the stack
c)
Adding a new element to the stack
d)
Sorting the elements in the stack
28.
Popping an element from the stack means __________
a)
Removing an element from the stack
b)
Searching a given element in the stack
c)
Adding a new element to the stack
d)
Sorting the elements in the stack
29.
Stack is also called __________
a)
LIFO
b)
FIFO
c)
LILO
d)
FILO
30.
Top of the stack points to -1 means __________
a)
Stack overflow
b)
Stack is full
c)
Stack is empty
d)
Stack Underflow
31.
When new data is to be inserted into a data structure, but there is no available space; this situation is usually called __________
a)
underflow
b)
overflow
c)
housefull
d)
saturated
32.
Which of the following name relate to stacks?
a)
FIFO List
b)
LIFO List
c)
LILO List
d)
Push-down List
33.
The term "push" and "pop" is related to the __________
a)
Array
b)
List
c)
Stack
d)
Structure
34.
A stack is a data structure in which addition of new element or deletion of an existing element always takes place at an end is called__________
a)
Rear
b)
Front
c)
Top
d)
Bottom
35.
The operation ___________ allows adding an element at the top of the stack
a)
push
b)
pop
c)
display
d)
rear
36.
The operation ___________ allows removing an element at the top of the stack
a)
push
b)
pop
c)
display
d)
rear
37.
Consider the stack where stack is allocated N=4 memory cells. STACK contains: A,B Now top will points to __________
a)
1
b)
2
c)
3
d)
4
38.
Consider the stack where stack is allocated N=3 memory cells. STACK contains: 1,2,3. What will happen if you are trying to insert an element 4
a)
underflow
b)
overflow
c)
housefull
d)
saturated
39.
Stack with maximum size 3 and top value 2 means __________
a)
Stack overflow
b)
Stack is full
c)
Stack is empty
d)
Stack Underflow
40.
In a stack top value is 3, which operation can perform to decrease the top value.
a)
push
b)
pop
c)
display
d)
insert
41.
In a stack top value is 4, which operation can perform to increase the top value.
a)
push
b)
pop
c)
display
d)
insert
42.
The ___________ organizes data helps to create more efficient program
a)
Operating System
b)
Data Structure
c)
Algorithms
d)
Pointer
43.
In Stack insertion and deletion are made at one end called__________
a)
Front
b)
Rear
c)
End
d)
Top
44.
At ___________ condition stack will be empty
a)
Top== -1
b)
Top == 0
c)
Top < -1
d)
Top = max
45.
In a stack, top==0 denotes that
a)
Stack is Empty
b)
Stack is Overflow
c)
Stack contains 1 element
d)
Stack is FULL
46.
Postfix expression is also called __________
a)
Polish Notation
b)
Reverse Polish Notation
c)
Infix
d)
Reverse Infix
47.
Postfix expression is also called __________
a)
Polish Notation
b)
Suffix
c)
Infix
d)
Reverse Infix
48.
The postfix equivalent to prefix a + ( b – c ) * e / f
a)
a b c – e f * / +
b)
a+ b c – e * f /
c)
a b c – e * f / +
d)
a * b c – e * f /
49.
In__________ notation the operands come first and then operators
a)
postfix
b)
prefix
c)
infix
d)
Polish Notation
50.
The ___________will converts infix expression to postfix expression to make translation easier.
a)
Stack
b)
Queue
c)
Array
d)
Binary Tree
51.
Prefix expression also called ___________
a)
Polish Notation
b)
Suffix
c)
Infix
d)
Reverse Infix
52.
The prefix equivalent to infix a + ( b – c) * e / f
a)
+ * / a - b c / d e
b)
+ a / * - b c e f
c)
- + a b * c d / e
d)
/ + a * - b c e f
53.
In__________ notation the operator comes first and then operand
a)
infix
b)
prefix
c)
suffix
d)
postfix
54.
Convert the given infix expression into prefix expression. Infix expression is a/b-c/d___________
a)
-/ab/cd
b)
/ab/c-d
c)
ab/-cd/
d)
/-ab/cd
55.
The value of postfix expression is 9 1 + 2 3 + / 2 *
a)
1
b)
2
c)
3
d)
4
56.
The evaluation of postfix expression, the data structure used is ________
a)
Stack
b)
Queue
c)
Array
d)
Binary Tree
57.
Evaluate the given postfix expression : A B + A B - / Value of A=5, B=3
a)
2
b)
3
c)
4
d)
5
58.
Evaluate the expression / + 1 1 – 4 3
a)
1
b)
2
c)
3
d)
4
59.
The value of prefix expression is / * + 8 1 – 3 1 6
a)
1
b)
2
c)
3
d)
4
60.
Tower of Hanoi is an application of __________
a)
Stack
b)
Queue
c)
Array
d)
Binary Tree
61.
Queue is a __________
a)
Linear data structure
b)
Non linear data structure
c)
LIFO data structure
d)
Structure
62.
The end at which an element added to a queue is __________
a)
rear
b)
Front
c)
top
d)
Bottom
63.
The end at which an element deleted from a queue is __________
a)
rear
b)
Front
c)
top
d)
Bottom
64.
Queue is also called __________
a)
FIFO List
b)
LIFO List
c)
LILO List
d)
Queue List
65.
Inserting an element at rear end is also known as __________
a)
Enqueue
b)
Dequeue
c)
Deque
d)
Queing
66.
Deleting an element from the front end is also known as ___________
a)
Enqueue
b)
Dequeue
c)
Deque
d)
Queing
67.
The ______ concept is used in railway reservation counter
a)
Stack
b)
Queue
c)
Array
d)
Binary Tree
68.
The data structure used in sheduling in computer is
a)
Stack
b)
Queue
c)
Array
d)
Binary Tree
69.
In a queue front and rear value is same, after deleting an element queue become
a)
Full
b)
overflow
c)
Empty
d)
Underflow
70.
Front is greater than rear and trying to delete an element from the queue results in __________
a)
Full
b)
overflow
c)
Empty
d)
Underflow
71.
Remove an element from the __________ of the queue
a)
rear
b)
Front
c)
front-1
d)
rear-1
72.
Add an element from the __________ of the queue
a)
rear
b)
Front
c)
front-1
d)
rear-1
73.
Consider an ordinary queue with maximum size 5. Front and Rear values are 2 and 4 respectively. Trying to insert an element to the queue results in __________
a)
Queue underflow
b)
Element inserted at position 5
c)
Queue overflow
d)
Element inserted at position 0
74.
For displaying queue elements , display starts from __________
a)
rear
b)
Front
c)
front-1
d)
rear-1
75.
In a circular queue implemented using an array and can hold 5 elements, if front is equal to 3 and rear is equal to 4, then new element would get placed at ______ position
a)
0
b)
1
c)
2
d)
3
76.
A circular queue the size of which is 5 has 2 elements 10, 20. After inserting 30, 40, 50 and deleting 10, what is the value of front and rear?
a)
0,3
b)
1,3
c)
2,3
d)
1,4
77.
In _______ data structure elements can be added in circular fashion
a)
Simple Queue
b)
Circular Queue
c)
Stack
d)
Deque
78.
While displaying circular queue elements, which method is suitable to increment front value? Max: Maximum size of the queue
a)
front=(front+1)/ Max
b)
front=(front+1) % Max
c)
front=front% Max
d)
front+=1
79.
In circular queue, insertion can be done by _________
a)
(rear % 1) + MAXSIZE
b)
rear %( 1 + MAXSIZE)
c)
(rear +1) %MAXSIZE
d)
rear + ( 1 % MAXSIZE)
80.
Front and rear end is logically connected in ________ queue
a)
Simple Queue
b)
Circular Queue
c)
Stack
d)
Deque
81.
In priority queue elements will be inserted and deleted based on __________
a)
Ascending order
b)
Descending order
c)
Priority of element
d)
FIFO
82.
A data structure where elements can be added or removed at both the ends called __________
a)
Tree
b)
Stack
c)
Queue
d)
Deque
83.
A queue is called __________ when insertion as well as deletion of elements can take place at both the ends
a)
Tree
b)
Stack
c)
Queue
d)
Deque
84.
A _______________ is queue in which insertion of an element takes place at one end only but deletion occurs at both ends.
a)
Output restricted Deque
b)
Input restricted Deque
c)
Dequeue
d)
Enqueue
85.
A _______________ is queue in which deletion of an element takes place at one end only but insertion occurs at both ends.
a)
Output restricted Deque
b)
Input restricted Deque
c)
Dequeue
d)
Enqueue
86.
The data is “ordered” only in the ___________
a)
Simple Queue
b)
Circular Queue
c)
Stack
d)
Deque
87.
The operator used to find the size of any variable
a)
sizeof()
b)
SizeOf()
c)
SizeOff()
d)
size()
88.
A __________ is method of storing data in a computer so that t can be used efficiently.
a)
Data Structure
b)
Structure
c)
Self referential
d)
pointer
89.
The operator __________ is used to access the members of the structure using structure pointer variable
a)
->
b)
*
c)
&
d)
#
90.
A ____________ is an ordered collection of data structure, which contains the location of the next element
a)
Queue
b)
Stack
c)
Linked List
d)
Pointer
91.
Linked list uses ___________ type of memory allocation
a)
Static
b)
Dynamic
c)
Compiler Depended
d)
pointer
92.
A ___________ is a connected sequence of Nodes
a)
Queue
b)
Stack
c)
Linked List
d)
Pointer
93.
No limit to the number of elements in list is ________
a)
Stack
b)
linked list
c)
array
d)
pointer
94.
Which one is the suitable way to create a node in a linked list
a)
Arrays
b)
Structure
c)
list
d)
union
95.
Link field of last node in a singly linked list will point to __________
a)
Next Node
b)
NULL
c)
Previous Node
d)
First Node
96.
Nodes are not named objects, but are referred by _________
a)
Structure
b)
Pointer
c)
NULL
d)
void
97.
The list which travels only from first node to last node is __________
a)
Singly linked List
b)
Doubly Linked list
c)
Circular Linked list
d)
stack
98.
Linked list use ___________ type of structures
a)
nested
b)
self referential
c)
union
d)
Simple
99.
Member field that points to the same structure is called _________
a)
nested
b)
self referential
c)
union
d)
Simple
100.
Link field of last node in a circular singly linked list will point to
a)
Next Node
b)
NULL
c)
Previous Node
d)
First Node
101.
In which of the linked list each node contains 2 pointers ____________
a)
Circular Doubly linked list
b)
Singly linked list
c)
Circular singly Linked list
d)
stack
102.
If the last node link points to the first node in the list, then the list is __________
a)
Singly linked List
b)
Doubly Linked list
c)
Circular Linked list
d)
stack
103.
The link travels from left to right & right to left is ________
a)
Singly linked List
b)
Doubly Linked list
c)
Circular singly Linked list
d)
stack
104.
If head node is NULL means___________
a)
List Empty
b)
List not created
c)
One Node
d)
List full
105.
Doubly linked list consist of minimum of ________ link fields
a)
0
b)
1
c)
2
d)
3
106.
Header node store normally ________
a)
Actual data
b)
Number of nodes in the list
c)
First node Address
d)
Last Node Address
107.
Application of linked list is __________
a)
Undo
b)
Deletion
c)
Recursion
d)
Polynomial evaluation
108.
To store the polynomial expression each node consists of ________ fields
a)
1
b)
2
c)
3
d)
4
109.
malloc() allocate ________ memory
a)
Single Block
b)
Multiple Block
c)
Frees Memory
d)
10 Block
Reset
