I am not able to understand what does the author mean by saying "remove trailing blanks and tabs".
I am not able to understand what does the author mean by saying "remove trailing blanks and tabs".
Imagine you have a string initialised like this:
As you can tell, after the last non-whitespace character in the string, there is some whitespace, in this case spaces (or "blanks"). As these come after the non-whitespace, we say that they are "trailing". Your task then is to remove such spaces, but also tabs in a similiar trailing position.Code:char text[] = "Hello world! ";
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)