Data Structures Quiz

Data Structures Quiz

University

50 Qs

quiz-placeholder

Similar activities

KLA Quiz Struktur Data UAS

KLA Quiz Struktur Data UAS

University

50 Qs

CS8391 - DS - IAT2

CS8391 - DS - IAT2

University

50 Qs

ASAJ  Semester 1 Informatika

ASAJ Semester 1 Informatika

10th Grade - University

50 Qs

Data structure

Data structure

University

50 Qs

EAS Struktur Data Kelas D

EAS Struktur Data Kelas D

University

47 Qs

Data Structures Quiz

Data Structures Quiz

University

50 Qs

Event Driven Handouts 1 & 2

Event Driven Handouts 1 & 2

University

45 Qs

DS and DAA Mock Quiz

DS and DAA Mock Quiz

University

50 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?