Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

EC8393_FDS_MODEL EXAM_3_PART A

Total questions: 30

Worksheet time: 30mins

Name
Class
Date
1.

What is the correct sequence of the compilation Process ?

a)

Assembler, Compiler, Preprocessor, Linking

b)

Compiler, Assembler, Preprocessor, Linking

c)

Preprocessor, Compiler, Assembler, Linking

d)

Assembler, Compiler, Linking, Preprocessor

2.

Which of the following statement is true?

a)

During Linking the Code #include replaces by stdio.h

b)

During Preprocessing the Code #include replaces by stdio.h

c)

During Execution the Code #include replaces by stdio.h

d)

During Editing the Code #include replaces by stdio.h

3.

What will be the output of the program?

#include<stdio.h>

int main()

{

const int i=0;

printf("%d\n", i++);

return 0;

}

a)

10

b)

11

c)

No output

d)

Error: ++needs a value

4.

What is the output of C Program with Strings.?


int main()

{

char str[]={'g','l','o','b','e'};

printf("%s",str);

return 0;

}

a)

g

b)

globe

c)

globe\0

d)

None of the above

5.

The ______ function appends not more than n characters.

a)

strcat()

b)

strcon()

c)

strncat()

d)

memcat()

6.

Which of the following is a collection of different data types

a)

String

b)

Structure

c)

Char

d)

All the above

7.

What is the similarity between a structure, union and enumeration?

a)

All of them let you define new values

b)

All of them let you define new data types

c)

All of them let you define new pointers

d)

All of them let you define new structures

8.

Which is an indirection operator among the following?

a)

*

b)

&

c)

#

d)

%

9.

The declaration int (*p) [5]; means

a)

the same as int *p[5];

b)

p is a one dimensional array of size 5, of pointers to integers

c)

Both A and B

d)

p is a pointer to a 5 element integer array

10.

Which is not a storage class?

a)

Auto

b)

Struct

c)

Typedef

d)

Static

11.

Which one of the following is an application of Queue Data Structure?

a)

When a resource is shared among multiple consumers.

b)

When data is transferred asynchronously (data not necessarily received at same rate as sent) between two processes

c)

Load Balancing

d)

All of the above

12.

In which data structure element is inserted at one end called Rear and deleted at other end called Front.

a)

Stack

b)

Queue

c)

Both

d)

Binary tree

13.

Queue data structure works on

a)

LIFO

b)

FIFO

c)

FILO

d)

NONE

14.

What data structure can be used to check if a syntax has balanced parenthesis ?

a)

Queue

b)

Stack

c)

List

d)

None

15.

In a queue, the initial values of front pointer f rear pointer r should be ……and ……….. respectively.

a)

0 and 1

b)

0 and -1

c)

-1 and 0

d)

1 and 0

16.

Which statement is correct about passing by values parameters?

a)

It cannot change the actual parameter Value

b)

It can change the actual parameter Value

c)

Parameter is always in read-write mode

d)

None

17.

Linked lists are not suitable for the implementation of?

a)

Insertion sort

b)

Radix sort

c)

Polynomial manipulation

d)

Binary search

18.

The declaration "unsigned u" indicates u is a/an

a)

unsigned character

b)

unsigned integer

c)

character

d)

none of' these

19.

The number of edges from the node to the deepest leaf is called _________ of the tree.

a)

Height

b)

Depth

c)

Length

d)

Width

20.

The following given tree is an example for?


a)

Binary tree

b)

Binary search tree

c)

Fibonacci tree

d)

AVL tree

21.

What is the most appropriate data structure for Breadth First Traversal of a tree?

a)

Linked List

b)

Queue

c)

Tree

d)

Array

22.

Time Complexity of DFS is? (V – number of vertices, E – number of edges)

a)

O(V + E)

b)

O(V)

c)

O(E)

d)

None of these

23.

What are the worst case and average case complexities of a binary search tree?

a)

O(n), O(n)

b)

O(logn), O(logn)

c)

O(logn), O(n)

d)

O(n), O(logn)

24.

What is the best case for linear search?

a)

O(nlogn)

b)

O(logn)

c)

O(n)

d)

O(1)

25.

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?

a)

3.00

b)

3.46

c)

2.81

d)

3.33

26.

What is the worst case complexity of bubble sort?

a)

O(nlogn)

b)

O(logn)

c)

O(n)

d)

O(n2)

27.

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?

a)

Heap Sort

b)

Selection Sort

c)

Insertion Sort

d)

Merge Sort

28.

In simple chaining, what data structure is appropriate?

a)

Singly linked list

b)

Doubly linked list

c)

Circular linked list

d)

Binary trees

29.

Which of the following ways can be used to represent a graph?

a)

Adjacency List and Adjacency Matrix

b)

Incidence Matrix

c)

Adjacency List, Adjacency Matrix as well as Incidence Matrix

d)

No way to represent

30.

Insertion sort is an example of an incremental algorithm.

a)

True

b)

False