#include <stdio.h> #include <conio.h> #include <string.h> main() { char* word1[]={"magazin", "good", "week", "affect"}; char* word2[]={"magasin", "god", "weak", "effect"}; int len=sizeof(word1)/sizeof(char*); for(int j=0;j<len;j++) { char *i1,*i2; printf("\n\n"); //ïðîâåðêà if (strlen(word1[j])>strlen(word2[j]) || strlen(word1[j])<strlen(word2[j])) continue; int m=strlen(word1[j]); i1=word1[j]; i2=word2[j]; for(int i=0;i<m;i++) { if(*(i1+i)==*(i2+i)) { printf("%d-letter is \"%c\"\n",i+1,*(i1+i)); } } } return 0; }