A string is a collection of characters. We'll learn how to declare strings, operate with strings in C programming, and use pre-defined string handling routines in this book.
We'll look at how to compare two strings, concatenate strings, copy one string to another, and execute other string operations. The pre-defined functions in the “string.h” header file can be used to conduct similar operations. You must include the string.h file in your C programme in order to use these string functions.
String Functions in C
The "string.h" library contains a number of useful string functions.
1) strlen(string name) returns the string name's length.
2) strcpy(source, destination) copies the contents of the source string to the destination string.
3) strcat(first string, second string) connects or concatenates the first and second strings. The string's result is saved in the first string.
4) strcmp(first string, second string) is a comparison function that compares the first and second strings. It returns 0 if two strings are the same.
5) strrev(string) returns the string in reverse order.
6) strlwr(string) returns lowercase string characters.
7) strupr(string) returns uppercase string characters.
Zeedup Course:
https://zeedup.com/home/course/c-prog...
www.zeedup.com