String Manipulations in C Programming Using Library Functions
String Manipulations in C Programming Using Library Functions
Library Functions
Strings are often needed to be manipulated by programmer according to the need of a problem. All string
manipulation can be done manually by the programmer but, this makes programming complex and large. To
solve this, the C supports a large number of strin g handling functions.
There are numerous functions defined in "string.h" header file. Few commonly used string handling
functions are discussed below:
Function
Work of Function
strlen()
strcpy()
strcat()
strcmp()
strlwr()
strupr()
Strings handling functions are defined under "string.h" header file, i.e, you have to include the code below to
run string handling functions.
#include <string.h>
Though, gets() and puts() function handle string, both these functions are defined in "stdio.h" header file.