• This function concatenates (combines) one string into another and returns the concatenated string.
• The prototype of function is defined in header file string.h
• Syntax
Char *strcat(char*dest, const char *src);
• The first argument of function is destination string and second argument is source string.
• The function combines source string into destination string and returns destination string i.e. first argument of function.
• Example:
strcat(a, “xxx”);
here, “xxx” is concatenated to string variable a.
• The prototype of function is defined in header file string.h
• Syntax
Char *strcat(char*dest, const char *src);
• The first argument of function is destination string and second argument is source string.
• The function combines source string into destination string and returns destination string i.e. first argument of function.
• Example:
strcat(a, “xxx”);
here, “xxx” is concatenated to string variable a.
No comments:
Post a Comment