Data Structures Quiz

Data Structures Quiz

University

50 Qs

quiz-placeholder

Similar activities

Data Structures

Data Structures

University

50 Qs

Quiz

Quiz

University

50 Qs

Data Structures and Algorithm - Final Examinations Quiz

Data Structures and Algorithm - Final Examinations Quiz

University

51 Qs

STACK DATA STRUCTURE

STACK DATA STRUCTURE

University

45 Qs

SAS Informatika Ganjil Kelas 8

SAS Informatika Ganjil Kelas 8

8th Grade - University

50 Qs

CPSC 131 midterm review

CPSC 131 midterm review

University

45 Qs

Quiz81-DS

Quiz81-DS

University

45 Qs

UTS Struktur Data

UTS Struktur Data

University

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