String handling functions
In C, string handling functions are available in the <string.h> header file. These functions provide various operations to manipulate and work with strings efficiently. Here are some commonly used string handling functions in C:
strlen(): Calculates the length of a string (excluding the null terminator '\0').
strcpy(): Copies one string to another.
strcat(): Concatenates (appends) one string to another.
strcmp(): Compares two strings. It returns an integer value:
0 if the strings are equal
A positive value if the first character that doesn't match has a greater ASCII value in the first string
A negative value if the first character that doesn't match has a greater ASCII value in the second string
strchr(): Searches for a character in a string and returns a pointer to its first occurrence.
strstr(): Searches for a substring in a string and returns a pointer to its first occurrence.
These are just a few of the many string handling functions available in C. They can be very useful for various string manipulation tasks in C programming.