I've been reading some stuff about C, i'm a beginner and at this point this is where i'm at:
This function keeps the input from the keyboard:
void store_sequence(char *arg) {
strcpy(estado.seq, arg);
estado.tamanho = strlen(arg);
}
and this is what i came so far to check if there are As on the string that was inserted on the keyboard:
void sequence_does_contain_As_and_Bs(char *arg) {
char buf [] = estado.seq;
s = strchr (buf, 'A');
if (s != NULL)
printf ("found a 'A' at %s\n", s);
}
So, basically, i need to detect if the input string has only As and Bs