1#include <stdio.h>
2#include <string.h>
3int main(int argc, char const *argv[]) {
4 char string1[] = {"tutorials point"};
5 char string2[] = {"tutorials point"};
6 //using function strcmp() to compare the two strings
7 if (strcmp(string1, string2) == 0)
8 printf("Yes 2 strings are same\n");
9 else
10 printf("No, 2 strings are not same\n" );
11 return 0;
12}
1#include <stdio.h>
2#include <string.h>
3int main(int argc, char const *argv[]) {
4 char string1[] = {"tutorials point"};
5 char string2[] = {"tutorials point"};
6 //using function strcmp() to compare the two strings
7 if (strcmp(string1, string2) == 0)
8 printf("Yes 2 strings are same\n");
9 else
10 printf("No, 2 strings are not same\n" );
11 return 0;
12}
1char str1[] = "Look Here";
2char str2[] = "Look Here";
3
4int i = strcmp(str1, str2);