NEW
Font size
WorksheetsMIDTERM
Total questions: 25
Worksheet time: 7mins
A fundamental in data structure in C++ that allows you to store a collection of an elements of the same type
link list
array
function
parameter
It contains a collection of statements that define what the functions does.
Function Body
array
link list
none of the following
A function in C++ that defined with a name, parameter, and no return types
True
False
A function in C++ that breaking down complex problem
modularity
array
link list
functions
It is enable you to directly access and modify the data stores at specific memory location
array
function
pointers
linked lisr
What is the purpose of arrays in programming?
grouping data
storing data
data coherence
data encrytion
How are array elements usually accessed ?
using indices
using keys
using pointer
using address
What advantage do arrays offer in terms of data organization?
facilitating the organization of related data items interms into a coherent structure
Enabling efficient data manipulation
Supporting diverse data types
Allowing direct access to elements via endices
What is a pointer?
A variable that store the memory address of another variable
A variable that shows the values of another variable
A function that returns the address of a variable
An operator that access the value of a variable
Which operator is used to declare a pointer varaible?
&
@
*
#
What does the following code do?
int num = 10
int *ptr =#
print ( "%",* ptr);
Print the address of num
Print the value of num
Print the value of ptr
Print the address the ptr
What is the type of a pointer that points to an integer variable?
int
int *
*int
&INT
What is the index range for the first and last element of an array?
0 to arraysize-0
1 to arraySize
arraySize to 0
0 to arraySize
What is the importance of arrays in loops and iterations?
Facilitating , iteration and operation execution
Enabling dynamic memory allocation
Efficient data oragnization
Supporting diverse data tyoes
Why are arrays fundamental in algorithm , data structures and programming practice?
They facilitate efficient data storage and manipulation
They support dynamic memory allocation
They enhance data organization
they handle diverse data types
This is like a place holder when a function is invoked
parameter
array
queue
none of the above
What is a node in data structure ?
function
A fundamental building block of data structure
a type of algorithm
a database system
What do nodes typicallly contain in a linked list data structure?
only data
only links
data and links
data and algorithm
What operation involves adding a new node to a data structure?
deletion
traversal
searching
insertion
What is the role of "next" in a typical node structure in a linked list?
store data
Points to the next node
points to the previous nodes
none of the above
How is node deletion typically handled in a linked list?
by adding a new node
by adjusting the necessary links
by traversing the next node
duplicating the node
What is the primary purpose of nodes in a tree data structure?
to perform sorting algorithm
to establish parent -child relationship
to connect to database
to store operations
In the context of graph data structure what do nodes represent?
Edges
Functions
Vertices
algorithms
In the linked-list , what does the "head" node refer to?
the last node
the middle node
the first node
a ramdom node
A data structure affects the designing of both structural and functional aspects of program
True
false
