I was practicing string handling functions in C and I happen to come across a string handling function called as strset in C. But I could not get many details about this function. What is the usage and syntax of this function?
Printable View
I was practicing string handling functions in C and I happen to come across a string handling function called as strset in C. But I could not get many details about this function. What is the usage and syntax of this function?
strset is used to set Bytes in String. The function strset sets all bytes of string, except the ending null character (\0).
The syntax of this function is
char *strset(char *string, int c);
Here the string must be first initialized and all the bytes of string, except the ending null character (\0) is set to c