Breaking

standard library function[BCA-II]

standard library function


The string library

The standard 'C' library provides various functions to manipulate the strings within a program. These functions are also called as string handlers. All these handlers are present inside <string.h> header file.
FunctionPurpose
strlen()This function is used for finding a length of a string. It returns how many characters are present in a string excluding the NULL character.
strcat(str1, str2)This function is used for combining two strings together to form a single string. It Appends or concatenates str2 to the end of str1 and returns a pointer to str1.
strcmp(str1, str2)This function is used to compare two strings with each other. It returns 0 if str1 is equal to str2, less than 0 if str1 < str2, and greater than 0 if str1 > str2.

कोई टिप्पणी नहीं:

एक टिप्पणी भेजें