
Data Structures Quiz

Quiz
•
Computers
•
University
•
Medium
RAJAT GARG
Used 1+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
55 questions
AI Quiz

Quiz
•
University
50 questions
Algoritmika 1.

Quiz
•
10th Grade - University
50 questions
Kuis Komputer Paralel

Quiz
•
University
49 questions
MCQs on UNIT II

Quiz
•
University
50 questions
Pre Test Informatika XI

Quiz
•
11th Grade - University
48 questions
Chuong3_Collection

Quiz
•
University
45 questions
Sorting, Searching and Big O Review

Quiz
•
9th Grade - University
55 questions
JAVASCRIPT LONG

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