Save
...
Data Structure & Algorithm Analysis
QUIZZES
QUIZ 1
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
rein
Visit profile
Cards (35)
What is the primary purpose of a data type in C++?
To classify
variables
and
objects
Which of the following is NOT a basic major data type in C++?
Graphical
What is the keyword used for a logical data type in C++?
bool
Which of the following is a floating-point data type?
double
What is an identifier in C++?
A name for
labels
,
types
,
variables
,
constants
, or
functions
Which of the following is NOT a rule for naming identifiers in C++?
Can contain spaces
What is the purpose of a constant in C++?
To hold
fixed
values
Which of the following is a valid C++ keyword?
return
What is a data structure?
A format for
storing
and organizing data
Which of the following is a non-linear data structure?
Tree
What is an abstract data type (ADT)?
A logical description of data and
operations
Which operation is NOT typically associated with ADTs?
Compiling
What is a stack in data structures?
A list where the
last
element added is the
first
retrieved
What is a queue in data structures?
A
list
where the
first
element
added
is the
first retrieved
What is the main characteristic of a heap?
It is a
complete binary tree
Which data structure is used to represent hierarchical data?
Tree
What is a graph in data structures?
A set of
vertices
and
edges
What is a priority queue?
A queue where
elements
are processed based on priority
What is a set in data structures?
A collection of
unique
elements
What is a map in data structures?
A set of
ordered pairs
Who is credited as the creator of C++?
Bjarne Stroustrup
What are the two broad categories of numerical data types in C++?
Integer
and
Floating point
Which of these is NOT a valid integer type in C++?
float
How many types of floating point numbers are there in C++?
2
What is the keyword used for strings in C++?
string
Which data type in C++ can only hold the values true or false?
bool
What is the purpose of using const in C++?
To
create
a
constant
What does the '\n' escape sequence represent in C++?
Newline
What is the purpose of the getline() function in C++?
To
read
a
line
of
text
What are the two types of data structures?
Linear
and
Non-linear
What does ADT stand for in the context of data structures?
Abstract Data Type
What principle does a stack data structure follow?
Last-In, First-Out
Tree
data structure
represents a hierarchical nature in a graphical form
What is a key characteristic of a heap data structure?
It's a
complete binary tree
What makes a priority queue different from a regular queue?
Elements
are processed based on their order