C++ examples for Data Type:Array Pointer
Illustrates changing a character string using pointer
#include <iostream> using namespace std; void main()/*w w w . java2s . co m*/ { char *c="this is a test"; cout << "My sister's maiden name was " << c << "\n"; c = "new value"; // Assigns new string to c. cout << "My sister's married name is " << c << "\n"; return; }