Open In App

GATE | GATE CS 1997 | Question 8

Like Article
Like
Save
Share
Report

A language L allows declaration of arrays whose sizes are not known during compilation. It is required to make efficient use of memory. Which of the following is true?
(A) A compiler using static memory allocation can be written for L
(B) A compiler cannot be written for L, an interpreter must be used
(C) A compiler using dynamic memory allocation can be written for L
(D) None of the above


Answer: (C)

Explanation: If a language L allows declaration of arrays whose sizes are not known during compilation time. It is required to use efficient use of memory.
So a compiler using dynamic memory allocation can be written for L.

An array is a collection of data items, all of the same type, accessed using a common name.

C dynamic memory allocation refers to performing manual memory management for dynamic memory allocation in the C programming language via a group of functions in the C standard library, namely malloc, realloc, calloc and free.

Quiz of this Question


Last Updated : 17 Jan, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads