Question: Question Goal: Learn how to work with c - strings. Assignment: For a social network you are building, you want users to be able to

Question
Goal: Learn how to work with c-strings.
Assignment: For a social network you are building, you want users to be able to write a short biography. To conserve
space in the database, you want to limit the size of the biography to 100 characters or less.
Write a code snippet that performs the following:
Read a user's biography from the console, as a C-string, using the cin. get line function. Assume the biography is
entered as a single line.
Calculate the length of the biography.
If the biography is 100 characters or less, store the number of remaining characters in the remaining variable,
which has already been declared.
If the biography is more than 100 characters, set remaining to -1. I need help with this question.
Question Goal: Learn how to work with c -

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!