Remove White Spaces from a String

Given a null-terminated string, remove all the white spaces.

Statement

Given a null-terminated string, remove all the white spaces (tabs or spaces) present in the string.

Example:

Sample input

All greek to me.    

Expected output

Allgreektome.

Let’s visualize this below:

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.