Ask Question
8 August, 22:22

What will the following code print out: int numbers [] = {99, 87,. 66, 55, 101}; for (int i = 1; i < 4; i++) cout << numbers [i] << end1; a) 99 87 66 55 101 b) 87 66 55 101 c) 87 66 55 d) Nothing.

+3
Answers (1)
  1. 9 August, 00:46
    0
    87 66 55

    Explanation:

    Array is used o store the multiple values with same data type.

    the array show a decimal value. 66, i assume this is enter by mistake because option has no decimal value.

    The index of the array is start from zero, it means the first element store in the array at position zero.

    In the for loop the variable 'i' start from 1 not zero and it goes to i<4 means i=3.

    So, it access the element from 2 to 4 because the index is position of element less than 1.

    Therefore, 87 66 55 print.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “What will the following code print out: int numbers [] = {99, 87,. 66, 55, 101}; for (int i = 1; i < 4; i++) cout ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers