strcat c code example
Example 1: strcasecmp c
Upon completion, strcasecmp() shall return an integer greater than, equal to, or less than 0, if the string pointed to by s1 is, ignoring case, greater than, equal to, or less than the string pointed to by s2, respectively.
Example 2: string strcat function in c
#include <stdio.h>
#include <string.h>
int main() {
char str1[100] = "This is ", str2[] = "A Name";
strcat(str1, str2);
puts(str1);
puts(str2);
return 0;
}
Example 3: strcat
#include <stdio.h>
#include <string.h>
int main () {
char src[50], dest[50];
strcpy(src, "This is source");
strcpy(dest, "This is destination");
strcat(dest, src);
printf("Final destination string : |%s|", dest);
return(0);
}