Time Left - 30:00 mins

IIIT Hyderabad Practice Quiz : Part test-1

Attempt now to get your rank among 293 students!

Question 1

We define D-Tree(G) as the tree obtained by applying the DFS algorithm on a graph G. Consider the following statements regarding the same.
S1 : If G is an undirected graph, then every edge in D-Tree(G) is either a tree edge or a back edge.
S2 : If G is a undirected graph, then every edge in D-Tree(G) is either a tree edge, or a cross edge.
Which of the above statements are true?

Question 2

A sorting technique is called stable if

Question 3

What will be the complexity of the below program?

Question 4

What is the basic idea behind Huffman coding ?

Question 5

Consider the following message:

Message = pppqqqqqrpqppqqrrrrssssspq

The number of bits required for huffman encoding of the above message are __________?

Question 6

Consider the following code.

Assume Node is a structure type with 3 members as follows:

If two binary tree root pointers are passed to the function f(), then which of the following statement is correct?

Question 7

fn(int n, int p, int r)


static int a;



case 4 : a+=a* r;

case 3: a+=a*r;

case 2: a+=a*r;

case 1: a+=a*r


printf(“%d”, a);


void main( )


fn(1, 1000, 12);


What is the output of above program ?

Question 8

Consider the following C-programming run over given binary tree by passing root node as the parameter:

The final value return by count ( ) functions is ____.

Question 9

What will be the output of the program?

Question 10

Input/output function prototypes and macros are defined in which header file?

Question 11

Consider the program.

main ()


int y = 1;

print f (“%d”, (*(char *) & x));


If the machine in which this program is executed in such a way that the lower significant digits occupy lower address, then the output will be _____.

Question 12

Consider a stack S which is initially empty. Now the following operations are performed on stack :
• Push(1)
• Push(2)
• Push(3)
• Pop
• Pop
• Push(1)
• Push(2)
• Pop
• Pop
• Push(3)
Now what is the position and element at top of stack ?

Question 13

 Queue follows which methodology for storing the data items.

Question 14

What will be the prefix expression corresponding the given expression?
a + b + c * d / e ^ f ^ g * h

Question 15

Assuming the items are inserted in order sorted into an empty binary search tree T, then the depth of such a tree is
  • 293 attempts

Posted by:

Priya UpadhyayPriya UpadhyayMember since Sep 2020
Priya Upadhyay
Share this quiz   |