Dynamic Allocation

Dynamic Allocation

University

8 Qs

quiz-placeholder

Similar activities

Revision 2 MCA

Revision 2 MCA

University

13 Qs

exception

exception

University

10 Qs

PPS MCQ on 22.11.2024

PPS MCQ on 22.11.2024

10th Grade - University

6 Qs

IT Quiz Round 3

IT Quiz Round 3

University

10 Qs

Quiz 9: Pointer

Quiz 9: Pointer

University

12 Qs

C Union

C Union

University

10 Qs

Operating System Chapter 2 Part 2

Operating System Chapter 2 Part 2

University

10 Qs

DS Quiz1

DS Quiz1

University

10 Qs

Dynamic Allocation

Dynamic Allocation

Assessment

Quiz

Computers

University

Medium

Created by

Abhishek Pandey

Used 16+ times

FREE Resource

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which header file is mandatory for DYNAMIC MEMORY ALLOCATION

stdio.h

math.h

stdlib.h

dos.h

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is correct about calloc() function?

Allocates the space for elements of an ARRAY

initialize the elements to 0

If the space is insufficient then return NULL pointer

ALL of these

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

calloc and malloc function is used for

dynamic memory allocation

static memory allocation

Both static memory allocation and dynamic memory allocation

ALL

4.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

void * malloc(size_t n) returns

Pointer to n bytes of uninitialized storage

NULL if the request can be satisfied

Nothing

All

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which of the following is static memory allocation

Array

stack

linked list

ALL

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

In function free(p), p is a

int

Pointer returned by malloc()

Pointer returned by calloc()

Pointer returned by malloc() & calloc()

7.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Memory allocation using malloc() is done in?

Static area

Heap area

Stack area

Both Stack & Heap area

8.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which one is used during memory deallocation in C?

free(p);

terminate(p);

delete(p);

remove(p);