
Data structures Viva

Quiz
•
Computers
•
University
•
Hard

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?
#include <stdio.h>
int main()
{
int arr[5]={10,20,30,40,50};
printf("%d", arr[5]);
return 0;
}
50
10
0
Garbage value
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following stack implemented using stack.
#define SIZE 11
struct STACK
{
int arr[SIZE];
int top=-1;
}
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.
int fun()
{
if(isEmpty())
{
return -10;
}
else
{
int n;
n= q[front];
front++;
return n;
}
}
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?
Insertfront(10);
Insertfront(20);
Insertrear(30);
Insertrear(40);
Deletefront();
Insertfront(50);
Deleterear();
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
Similar Resources on Wayground
16 questions
DS - Linked List - S1

Quiz
•
University
10 questions
Quiz on Stacks and Data Structures 2

Quiz
•
University
14 questions
Cuestionario sobre Lenguajes de Programación

Quiz
•
7th Grade - University
11 questions
WarStory-DataStructure2

Quiz
•
University
10 questions
AdvancedProgramming_intro

Quiz
•
University
16 questions
Linked List and Arrays in JAVA

Quiz
•
University
16 questions
Y13 Graph Traversal

Quiz
•
9th Grade - University
15 questions
Knowledge Knockout[Quiz Round](2nd-4th years)

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University