#include <stdio.h>
#include <string.h>
#define MAX 100
int main() {
char string[MAX];
printf("Digite uma string: "); printf("Comprimento de '%s': %d\n",string
,comp
);
printf("Informe um caractere: "); char chave[2];
printf("O caractere informado nao existe na string.\n"); else
printf("O caractere informado existe na string.\n");
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KI2RlZmluZSBNQVggMTAwCgppbnQgbWFpbigpIHsKICAgIGNoYXIgc3RyaW5nW01BWF07CiAgICBwcmludGYoIkRpZ2l0ZSB1bWEgc3RyaW5nOiAiKTsKICAgIHNjYW5mKCIlW15cbl1zIixzdHJpbmcpOwogICAgaW50IGNvbXAgPSBzdHJsZW4oc3RyaW5nKTsKICAgIHByaW50ZigiQ29tcHJpbWVudG8gZGUgJyVzJzogJWRcbiIsc3RyaW5nLGNvbXApOwoKICAgIHByaW50ZigiSW5mb3JtZSB1bSBjYXJhY3RlcmU6ICIpOwogICAgY2hhciBjaGF2ZVsyXTsKICAgIHNjYW5mKCIlcyIsY2hhdmUpOwoKICAgIGlmKCFzdHJzdHIoc3RyaW5nLCBjaGF2ZSkpCiAgICAgICAgcHJpbnRmKCJPIGNhcmFjdGVyZSBpbmZvcm1hZG8gbmFvIGV4aXN0ZSBuYSBzdHJpbmcuXG4iKTsKICAgIGVsc2UKICAgICAgICBwcmludGYoIk8gY2FyYWN0ZXJlIGluZm9ybWFkbyBleGlzdGUgbmEgc3RyaW5nLlxuIik7CgogICAgcmV0dXJuIDA7Cn0K