1#include<stdio.h>
2#include<string.h>
3
4
5int main()
6{
7
8 char char1[] = "coucou";
9 char char2[] = "coucou";
10
11 if( strcmp(char1, char2) == 0 )
12 printf("Strings are the same");
13
14 else
15 prinf("Strings are differentes");
16
17
18 return 0;
19}
1int strcmp ( const char * str1, const char * str2 );
2
3// returning value | indicates
4// <0 the first character that does not match has a lower value in ptr1 than in ptr2
5// 0 the contents of both strings are equal
6// >0 the first character that does not match has a greater value in ptr1 than in ptr2
7