Ask Question
23 January, 02:08

When you create an array variable, memory space is automatically reserved.

True

False

+1
Answers (1)
  1. 23 January, 04:59
    0
    The answer is true.

    Explanation:

    An array is a collection of data of the same type. It is used to handle a number ''n'' of elements in common, either of types defined by the language (int, float, string, etc) as well as those defined by the programmer.

    A one dimensional array is a structured data type that is made up of a finite, ordered collection of data of the same type.

    A vector, also called a one dimensional array, is a data structure that allows you to group elements of the same type and store them in a single block of memory together, one after the other. This group of elements is identified by the same name and the position in which they are found. Ther first position of the array is position zero.

    We could group in an array a series of elements of integer type, floating, etc. For example:

    int a [5]; (vector of 5 integers)

    float b[5]; (vector of 5 floating)

    int a [] = {5,6,7,8,9};

    float b [] = {5.1,5.2,5.3,5.4,5.5};

    Since there are 5 elements in each array, automatically 5 memory spaces will be assigned to each vector, but if I try to create the vector of the form int a [], the compiler will show an error, because I did not indicate the size of the vector and I did not initialize its elements.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “When you create an array variable, memory space is automatically reserved. True False ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers