Declare a char array named line suitable for storing C-strings as large as 50 characters, and write a statement that reads in the next line of standard input into this array. (Assume no line of input is 50 or more characters.)

Declare a char array named line suitable for storing C-strings as large as 50 characters, and write a statement  that reads in the next line of standard input into this array. (Assume no line of input is 50 or more characters.)

LANGUAGE: C++

CHALLENGE:

Declare a char array named line suitable for storing C-strings as large as 50 characters, and write a statement that reads in the next line of standard input into this array. (Assume no line of input is 50 or more characters.)

SOLUTION:



char line[50];
cin.getline(line,50);

Add comment