C++ Programming Code Examples C++ > For Loops and While Loops Code Examples Initializing each element separately in the loop: Initializing each element separately in the loop: int newArray[5]; int n = 0; // Initializing elements of array seperately for(n=0;n<sizeof(newArray);n++) { newArray[n] = n; }