Assume that c is a char variable has been declared. Write some code that reads in the first character of the next line into c. Assume that the lines of input are under 100 characters long.

LANGUAGE: C++

CHALLENGE:

Assume that c is a char variable has been declared. Write some code that reads in the first character of the next line into c. Assume that the lines of input are under 100 characters long.

SOLUTION:



cin.ignore(20,'\n');
cin.get(c);