Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The remove_spaces() function in this noncompliant code example accepts a pointer to a string str and a string length slen and removes the space character from the string by shifting the remaining characters towards toward the front of the string. The function remove_spaces() is passed a const char pointer as an argument. The const qualification is cast away and then the contents of the string are modified.

...