Answer:
#include <iostream>//including libraries
using namespace std;
int main()
{
int arr[6] = { 0,1,2,3,4,5 };//make sure size of arr is 1 less than secArr
int secArr[7];//second array (1 element bigger)
for (int i = 0;i < 6;i++)//looping through each element (6 times)
{
secArr[i + 1] = arr[i];//transferring elements to second array and shifting by 1 cell
cout << secArr[i + 1] << endl;//printing elements of second array
}
return 0;//terminating program
}
Explanation:
The array size can range from any number. just make sure to keep arr one less than secArr. This is because we need the room for the extra element. This task is to help you understand how array work and how to parse through them using loops. For loops are the best for this task because even if you think intuitively, they work for as long as there are items in the array. and you can define the size yourself.
Answer:
The first value of i is 0 and last value of i is 20.
Explanation:
The following are the description of a given loop.
- In this problem, there are two loops one is the internal loop and the other is the external loop
- In the outer loop, the value of " i" is initialized with "0" So the first value is printed 0 in the console.
- For one value of "i" all the inner loop is executed.
- The loop is executed is less equal to 20 that's why the last value of "i" is printed 20 in the console window.
Dude is u still use this app then friend meh on roblox