C++ Program To Display Content of Array

This program is used to initialize a set of string in a one dimensional character array and to display the content of the array.

This program consist of array named “name [ ]“.

The function “name [i]‘  is used to display the content of an array.



Void main ()


Int I;

Char name [] =”This is a test program”;

Cout<<\n content of the array”;

For (i=0; name[i]! = ‘\o’;i++)




getch ();


Related posts:

  1. C++ Program To Display Result Stored In An Array This program takes ‘n’ number as input , stores it...
  2. C++ Program Using getdata() and display() The program uses member function getdata() and display() in-order to...
  3. Array of class objects Array of class objects and single inheritance A program consisting...
  4. Array Of Class Object Array of class objects Array is a collection of similar...
  5. String In C++ String A string is an array of type char. Declaration:- ...