Arrays in loops

-5

I could not solve the following question:

Fill in the blanks to print all elements of a array arr containing 3 elements:

for(int x=0; x<___; x++){______<<______[x]<<endl;}
    
asked by anonymous 16.05.2017 / 04:16

1 answer

1

Through the commentary, you can fill in the first two. If you want to print the array arr , you should print what? The variable that contains the array , right? More specifically you should print an array element through its index. This index is already in the code ( [x] ). Then only the variable name is missing.

If someone asks you the color of Napoleon's white horse, do you know how to respond? So the answer is already in the question. Do I need to write?

    
16.05.2017 / 04:29