C++ examples for Data Type:char array
Asking for the your Name and store in char array
#include <iostream> using namespace std; int main(int argc, char *argv []) { cout << "What is your name?" << endl << endl; char playerName[1024]; cin >> playerName; //from w w w . j a v a2 s . c o m cout << endl << "Hello " << playerName << endl; return 0; }