WorksheetsEC8393_FDS_MODEL EXAM_3_PART A
Total questions: 30
Worksheet time: 30mins
What is the correct sequence of the compilation Process ?
Assembler, Compiler, Preprocessor, Linking
Compiler, Assembler, Preprocessor, Linking
Preprocessor, Compiler, Assembler, Linking
Assembler, Compiler, Linking, Preprocessor
Which of the following statement is true?
During Linking the Code #include replaces by stdio.h
During Preprocessing the Code #include replaces by stdio.h
During Execution the Code #include replaces by stdio.h
During Editing the Code #include replaces by stdio.h
What will be the output of the program?
#include<stdio.h>
int main()
{
const int i=0;
printf("%d\n", i++);
return 0;
}
10
11
No output
Error: ++needs a value
What is the output of C Program with Strings.?
int main()
{
char str[]={'g','l','o','b','e'};
printf("%s",str);
return 0;
}
g
globe
globe\0
None of the above
The ______ function appends not more than n characters.
strcat()
strcon()
strncat()
memcat()
Which of the following is a collection of different data types
String
Structure
Char
All the above
What is the similarity between a structure, union and enumeration?
All of them let you define new values
All of them let you define new data types
All of them let you define new pointers
All of them let you define new structures
Which is an indirection operator among the following?
*
&
#
%
The declaration int (*p) [5]; means
the same as int *p[5];
p is a one dimensional array of size 5, of pointers to integers
Both A and B
p is a pointer to a 5 element integer array
Which is not a storage class?
Auto
Struct
Typedef
Static
Which one of the following is an application of Queue Data Structure?
When a resource is shared among multiple consumers.
When data is transferred asynchronously (data not necessarily received at same rate as sent) between two processes
Load Balancing
All of the above
In which data structure element is inserted at one end called Rear and deleted at other end called Front.
Stack
Queue
Both
Binary tree
Queue data structure works on
LIFO
FIFO
FILO
NONE
What data structure can be used to check if a syntax has balanced parenthesis ?
Queue
Stack
List
None
In a queue, the initial values of front pointer f rear pointer r should be ……and ……….. respectively.
0 and 1
0 and -1
-1 and 0
1 and 0
Which statement is correct about passing by values parameters?
It cannot change the actual parameter Value
It can change the actual parameter Value
Parameter is always in read-write mode
None
Linked lists are not suitable for the implementation of?
Insertion sort
Radix sort
Polynomial manipulation
Binary search
The declaration "unsigned u" indicates u is a/an
unsigned character
unsigned integer
character
none of' these
The number of edges from the node to the deepest leaf is called _________ of the tree.
Height
Depth
Length
Width
The following given tree is an example for?
Binary tree
Binary search tree
Fibonacci tree
AVL tree
What is the most appropriate data structure for Breadth First Traversal of a tree?
Linked List
Queue
Tree
Array
Time Complexity of DFS is? (V – number of vertices, E – number of edges)
O(V + E)
O(V)
O(E)
None of these
What are the worst case and average case complexities of a binary search tree?
O(n), O(n)
O(logn), O(logn)
O(logn), O(n)
O(n), O(logn)
What is the best case for linear search?
O(nlogn)
O(logn)
O(n)
O(1)
Suppose there are 11 items in sorted order in an array. How many searches are required on the average, if binary search is employed and all searches are successful in finding the item?
3.00
3.46
2.81
3.33
What is the worst case complexity of bubble sort?
O(nlogn)
O(logn)
O(n)
O(n2)
Consider a situation where swap operation is very costly. Which of the following sorting algorithms should be preferred so that the number of swap operations are minimized in general?
Heap Sort
Selection Sort
Insertion Sort
Merge Sort
In simple chaining, what data structure is appropriate?
Singly linked list
Doubly linked list
Circular linked list
Binary trees
Which of the following ways can be used to represent a graph?
Adjacency List and Adjacency Matrix
Incidence Matrix
Adjacency List, Adjacency Matrix as well as Incidence Matrix
No way to represent
Insertion sort is an example of an incremental algorithm.
True
False
