Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- _Bool areEqual(char str1[], char str2[]){
- int i=0;
- while (str1[i]!='\0' && str2[i]!='\0'){
- if (str1[i]==str2[i]){
- i++;
- }
- else
- return 0;
- }
- if (str1[i]==str2[i])
- return 1;
- else
- return 0;
- }
- int main(void) {
- printf("%i", areEqual("qwert", "qwerty"));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment