Quiz on Arrays in C++

Any programming language would have an array as it would be a series of related items stored at contiguous memory locations and their elements could be accessed randomly at random locations through variables and indexes. During the upcoming quiz, we will test your understanding of the C++ Arrays. Good Luck!

Summary

A programming language’s most essential concept is the array. Hope this quiz has helped you gauge your understanding of arrays. As you continue to attempt quizzes, you will learn more. Wishing you a wonderful learning experience!

4 Responses

  1. Manungas says:

    What is the output of the following code?
    #include
    using namespace std;
    int main()
    {
    int a[][2] = {{1, 2}, {3, 4},{5,6}};
    cout << sizeof(a);
    return 0;
    }

  2. BasweshwarNagnath nagnath kurhade says:

    24

  3. Muneer Ahmed Babar says:

    rows = 3
    columns = 2
    3 * 2 = 6
    int takes 4 bytes
    therefore the size of ‘a’ is 6*4 = 24

Leave a Reply

Your email address will not be published. Required fields are marked *