Data structures Viva

Data structures Viva

University

15 Qs

quiz-placeholder

Similar activities

PDS - 04225 Lists, Stacks and Queues - Chapter 5

PDS - 04225 Lists, Stacks and Queues - Chapter 5

University

10 Qs

Prelims - LIST

Prelims - LIST

University

20 Qs

Data Structures

Data Structures

University

20 Qs

IEEE_Round2

IEEE_Round2

University

13 Qs

Data Structures FCI

Data Structures FCI

University

19 Qs

LINKEDLIST- DSA -2-3

LINKEDLIST- DSA -2-3

University

20 Qs

Basics of Data Structure

Basics of Data Structure

University

20 Qs

DSA Quiz 2

DSA Quiz 2

University

18 Qs

Data structures Viva

Data structures Viva

Assessment

Quiz

Computers

University

Hard

Created by

V Shejina

Used 3+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the below code?

  1. #include <stdio.h>  

  2. int main()  

  3. {  

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

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

  6.   

  7.     return 0;  

  8. }  

50

10

0

Garbage value

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the following stack implemented using stack.

  1. #define SIZE 11  

  2. struct STACK  

  3. {  

  4.    int arr[SIZE];  

  5.    int top=-1;   

  6. }  

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

9

10

11

12

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of the following is the overflow condition if a circular queue is implemented using array having size MAX?

rear= MAX-1

rear= MAX

front=(rear+1) mod MAX

None of these

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the following code.

  1. int fun()  

  2. {  

  3.    if(isEmpty())  

  4.    {  

  5.       return -10;   

  6.    }  

  7.   else  

  8.   {  

  9.      int n;  

  10.      n= q[front];  

  11.      front++;  

  12.      return n;   

  13.   }  

  14.     

  15. }   

Which operation does the above code perform?

A)Enqueue

B) Dequeue

C) Returns the front element

Both B & C

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

  1. Insertfront(10);  

  2. Insertfront(20);  

  3. Insertrear(30);  

  4. Insertrear(40);  

  5. Deletefront();  

  6. Insertfront(50);  

  7. Deleterear();  

  8. Display();  

10, 20, 30

50, 10, 30

40, 20, 30

None of the above

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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.

5

0

1

2

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

____

2

3

4

5

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?