//File: string1.cpp #include using namespace std; int main() { //char s[2] = "HI"; // Error Message: // initializer-string for array of chars is too long char s[3] = "HI"; // or //char s[3]={'H','I','\0'}; //CORRECTS the problem. cout << s << endl; return 0; }