2
I need to do a function that takes two strings, and switch places both. But if you have a capital letter in the first one, at the time of converting you need to go to lowercase. I tried to do, only I think it’s wrong inside of mine while
. What can I do?
Note: I cannot use string functions. h'.
void str_troca(char origem[], char minusc[])
{
char aux[MAX];
int i=0;
int a=1;
int b=0;
while(origem[i]!='\0')
{
if(origem[i]>64 && origem[i]<91)
{
origem[i]-32;
}
i++;
}
aux[i]=origem[i];
origem[i]=minusc[i];
minusc[i]=aux[i];
printf("%s\n",minusc );
printf("%s\n",origem );
}
our, error beast kkkk. Vlw bro, helped mto kkk
– flavio
Good your tip from
>='A'
but have to be careful to put single quotes and not double quote.– le314u