
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
50 questions
Self Assessment on Stacks & Queues

Quiz
•
University
50 questions
MInd Freak Round-1

Quiz
•
University
45 questions
Unit Test II

Quiz
•
University
50 questions
DSU MCQ on Stacks & Queues

Quiz
•
University
53 questions
UTS Struktur Data

Quiz
•
University
50 questions
DS-UNIT-2-Stack Queue

Quiz
•
University
50 questions
codinggss

Quiz
•
University
50 questions
SAS Informatika Ganjil Kelas 9

Quiz
•
9th Grade - University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade