Within the C programming language, a string is a sequence of characters. An empty string is a string with no characters. Checking for empty strings is a standard process in programming, and there are a number of methods to do it.
One technique to test for an empty string is to make use of the strlen() operate. The strlen() operate returns the size of a string, and an empty string has a size of 0. The next code reveals the right way to use the strlen() operate to test for an empty string: