C++ Programming Question: Download Questions PDF
Why are arrays usually processed with for loop?
![C++ Programming Interview Answer C++ Programming Interview Question](https://globalguideline.com/public/images/interview/24.png)
Answer:
The real power of arrays comes from their facility of using an index variable to traverse the array, accessing each element with the same expression a[i]. All the is needed to make this work is a iterated statement in which the variable i serves as a counter, incrementing from 0 to a.length -1. That is exactly what a loop does.
Download C++ Programming Interview Questions And Answers
PDF
Previous Question | Next Question |
What is the output of the following program? Why? | What is an HTML tag? |