Check out example codes for "how to add a number after each number in an array with a for loop in C++". It will help you in understanding the concepts better.

Code Example 1

#include<iostream>
	using namespace std;

	int main()
	{
		int a[4];
		int i;

		for ( i = 0; i < 4; i++ )
			a[i] = 0;
		for ( i = 0; i < 4; i++ )
			cout << a[i] << '\n';
		return 0;
	}

Learn ReactJs, React Native from akashmittal.com