The program first initializes the array arr with the values {11, 22, 33, 44, 55} using an array initializer. It then sets an integer variable n to 0 and enters a while loop. The while loop checks if n is less than or equal to 4 (which is the index of the last element in the array). If this condition is true, the loop prints the value of arr[n] on a new line using cout and then increments n by 1. The loop continues until n becomes 5, at which point the loop condition is false and the program exits.
#include <iostream> using namespace std; int main() { int arr[]={11, 22, 33, 44, 55}; int n=0; while(n<=4) { cout<<arr[n]<<endl; n++; } return 0; }To download raw file Click Here
11 22 33 44 55
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions