Ask Question
29 January, 07:31

Declare a char array named line of size 50, and write a statement that reads in the next line of console input into this array. (Assume the line may contain whitespace characters and the total number of the characters in the line is less than 50)

+4
Answers (1)
  1. 29 January, 08:32
    0
    Following are the statement in the C+ + Programming Language.

    //set character data type variable

    char line[50];

    //get character input from the user

    cin. get (line, 50);

    Explanation:

    Following are the description of the statement.

    In the above statement, we set character data type array variable that is 'line' and its index value is '50' that means the following variable not contain more than 50 character elements. In the other line, we get character type input in the following variable 'line' from the user through the get () method.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Declare a char array named line of size 50, and write a statement that reads in the next line of console input into this array. (Assume the ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers