Ask Question
23 January, 10:11

Consider the following declaration: int alpha[5] = {3, 5, 7, 9, 11};. Which of the following is equivalent to this statement? int alpha[] = {3, 5, 7, 9, 11}; int alpha[] = {3 5 7 9 11}; int alpha[5] = {3, 5, 7, 9 11}; int alpha[4] = (3, 5, 7, 9, 11);

+2
Answers (1)
  1. 23 January, 13:53
    0
    int alpha[] = {3, 5, 7, 9, 11}

    Step-by-step explanation:

    int alpha[5] declares a list of 5 items. The values within the brackets needs to be separeted by commas, otherwise it'd produce an error. You can declare a list without specifying its size in the square brackets if you also declare its values, so the compiler will give reserve the memory needed.

    Last satement gives also an error because the size declared does not match with the amount of items.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Consider the following declaration: int alpha[5] = {3, 5, 7, 9, 11};. Which of the following is equivalent to this statement? int alpha[] = ...” in 📘 Mathematics 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