
Data Structures Quiz
Authored by RAJAT GARG
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
50 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an abstract data type?
int
array
stack
pointer
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does malloc() return if it fails to allocate memory?
-1
NULL
0
void
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following allocates dynamic memory in C?
new
malloc
alloc
alloc_mem
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to allocate memory for an integer array of 5 elements?
int *arr = malloc(5);
int *arr = malloc(sizeof(int) * 5);
int arr[5];
int arr = malloc(5);
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which scenario best explains the use of pointers?
To swap values in a function
To print output
To increase array size
To declare constants
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why is dynamic memory allocation important?
Prevents function calls
Helps define memory at runtime
Improves syntax
Supports all data types
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which part of memory is used by dynamically allocated memory?
Stack
Heap
Code
Data
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
50 questions
Quiz Informatika 1
Quiz
•
11th Grade - University
53 questions
Java Fundamentals Challenge
Quiz
•
University
50 questions
CSC 105 Data Structures and Algorithms Midterm Exam
Quiz
•
University
50 questions
KLA Quiz Struktur Data UAS
Quiz
•
University
50 questions
Quiz Komponen Komputer
Quiz
•
10th Grade - University
45 questions
Quiz-PTI 4-5-6
Quiz
•
University
46 questions
CSCI0613 - Course Packet 1
Quiz
•
University
50 questions
JARINGAN KOMPUTER
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade