Data Structures

Quiz
•
Computers
•
University
•
Medium
VIJI S
Used 55+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How is an array initialized in C language?
int a[3] = {1, 2, 3};
int a = {1, 2, 3};
int a[] = new int[3]
int a(3) = [1, 2, 3];
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not the type of queue?
Priority queue
Single-ended queue
Circular queue
Ordinary queue
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the output of the following code snippet?
void solve() {
int a[] = {1, 2, 3, 4, 5};
int sum = 0;
for(int i = 0; i < 5; i++) {
if(i % 2 == 0) {
sum += *(a + i);
}
else {
sum -= *(a + i);
}
}
cout << sum << endl;
}
15
syntax error
3
2
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not the type of queue?
Single-ended queue
Circular queue
Priority queue
Ordinary queue
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How are String represented in memory in C?
LinkedList of characters.
The object of some class.
An array of characters.
Same as other primitive data types.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The depth of a complete binary tree is given by
Dn = log2n+1
Dn = n log2n+1
Dn = n log2n
Dn = log2n
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Binary trees nodes with no successor are called......
Final nodes
Last nodes
Terminal nodes
End nodes
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
IPC

Quiz
•
University
20 questions
Data structure

Quiz
•
University
20 questions
Quantitative Aptitude Series

Quiz
•
University
20 questions
CodeHS - Intro to Python - Basics and Console Interaction

Quiz
•
9th Grade - Professio...
20 questions
SMARTICUS

Quiz
•
University
15 questions
ROTC Make-up Quiz

Quiz
•
University
20 questions
TECH FUED ROUND-1

Quiz
•
University
20 questions
Output Quiz-7

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