
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
20 questions
New DSC Quiz

Quiz
•
University
10 questions
Structure Data Review

Quiz
•
University - Professi...
15 questions
DS Module 3 Linked List

Quiz
•
University
20 questions
9.4.25 Mentoring quiz

Quiz
•
University
10 questions
C++ linked list

Quiz
•
University
10 questions
DSA quiz

Quiz
•
University
20 questions
Data Structure

Quiz
•
University
10 questions
DAA-UNIT-4 QUIZ

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University