Data Structures Quiz

Data Structures Quiz

University

50 Qs

quiz-placeholder

Similar activities

Kuis 7 AlgoSD

Kuis 7 AlgoSD

University

55 Qs

UAS GANJIL INFORMATIKA X

UAS GANJIL INFORMATIKA X

10th Grade - University

50 Qs

Logika dan Algoritma P15 (Quiz)

Logika dan Algoritma P15 (Quiz)

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

CPSC 131 midterm review

CPSC 131 midterm review

University

45 Qs

Latihan Ulangan Semester 1 kelas 9

Latihan Ulangan Semester 1 kelas 9

7th Grade - University

50 Qs

Pertanyaan Algoritma dan Pencarian Data

Pertanyaan Algoritma dan Pencarian Data

University

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