Data Structures Quiz

Data Structures Quiz

University

50 Qs

quiz-placeholder

Similar activities

Data Structure - Stack and Queue

Data Structure - Stack and Queue

University

50 Qs

Tree dan Graph

Tree dan Graph

University

50 Qs

DOS5311 Quiz 1

DOS5311 Quiz 1

University

50 Qs

Tech Spardha in MIT PC

Tech Spardha in MIT PC

University

50 Qs

C programming quiz

C programming quiz

University

55 Qs

IT211- Data Structures and Algorithm

IT211- Data Structures and Algorithm

University

45 Qs

Prelim and Midterm Examination

Prelim and Midterm Examination

University

55 Qs

latihan ASTS 1 kelas IX

latihan ASTS 1 kelas IX

9th Grade - University

45 Qs

Data Structures Quiz

Data Structures Quiz

Assessment

Quiz

Computers

University

Medium

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?