0
Subject : Arrays in Loops
Can you tell me how this software came about ? I am not understand this. #include <iostream> using namespace std; int main() { int myArr[6]; for(int x=0; x<5; ++x) { myArr[x] = 42; cout << x << ": " << myArr[x] << endl; } return 0; } How does myArr work?
3 odpowiedzi
+ 2
It will display
0:42
1:42
2:42
3:42
4:42
Please ask the question more clear.
Mention your doubt more specifically
+ 2
How does myArr work?