#include <stdio.h>
#include <stdlib.h>
int testarString(char fonte[], char encontrar[]){
int i = 0;
while (i
<= strlen(encontrar
)){ if (strchr(fonte
, encontrar
[i
]) == 0) return 1;
i++;
}
return 0;
}
int main(){
char v[] = "cdeuabf";
char s[] = "abuc";
if (testarString(v, s) == 0){
printf("Os caracteres da string %s aparecem em %s!\n", s
, v
); } else {
printf("Um determinado caractere da string %s nao foi encontrada em %s\n", s
, v
); }
return EXIT_SUCCESS;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCB0ZXN0YXJTdHJpbmcoY2hhciBmb250ZVtdLCBjaGFyIGVuY29udHJhcltdKXsKICAgIGludCBpID0gMDsKICAgIHdoaWxlIChpIDw9IHN0cmxlbihlbmNvbnRyYXIpKXsKICAgICAgICBpZiAoc3RyY2hyKGZvbnRlLCBlbmNvbnRyYXJbaV0pID09IDApCiAgICAgICAgICAgIHJldHVybiAxOwogICAgICAgIGkrKzsKICAgIH0KICAgIHJldHVybiAwOwp9CgppbnQgbWFpbigpewogICAgY2hhciB2W10gPSAiY2RldWFiZiI7CiAgICBjaGFyIHNbXSA9ICJhYnVjIjsKICAgIGlmICh0ZXN0YXJTdHJpbmcodiwgcykgPT0gMCl7CiAgICAgICAgcHJpbnRmKCJPcyBjYXJhY3RlcmVzIGRhIHN0cmluZyAlcyBhcGFyZWNlbSBlbSAlcyFcbiIsIHMsIHYpOwogICAgfSBlbHNlIHsKICAgICAgICBwcmludGYoIlVtIGRldGVybWluYWRvIGNhcmFjdGVyZSBkYSBzdHJpbmcgJXMgbmFvIGZvaSBlbmNvbnRyYWRhIGVtICVzXG4iLCBzLCB2KTsKICAgIH0KICAgIHJldHVybiBFWElUX1NVQ0NFU1M7Cn0K