In the code segment below, assume that the int array numArr has been properly declared and initialized. The code segment is intended to reverse the order of the elements in numArr. For example, if numArr initially contains {1, 3, 5, 7, 9}, it should contain {9, 7, 5, 3, 1} after the code segment executes. /* missing loop header */

Respuesta :

Answer:

for (k=4 ; k>=0; k--)

{

cout<<numArr[k];

}

Explanation:

If

first index of array = 0

then

last index will be = 4

so loop will starts from 4 and ends at 0. to print the array in reverse order.

ACCESS MORE
EDU ACCESS
Universidad de Mexico