The program defines an array of 5 char pointers named names. The values of these pointers are initialized to point to string literals. The program then uses a for loop to iterate over the array and print each of the strings using the cout statement. Therefore, the output of the program is the 5 names "Arun", "Aswin", "Kanish", "Ram", and "Sam", each printed on a new line.
#include<iostream> using namespace std; int main() { char* names[5]={"Arun","Aswin","Kanish","Ram","Sam"}; for(int i=0;i<5;i++) { std::cout<<names[i]<<std::endl; } return 0; }To download raw file Click Here
Arun Aswin Kanish Ram Sam
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions