-1
#include<stdio.h>
#include<string.h>
/*Função que verifica tamanho da string*/
int conta_str(char x){
int i, tamanho = 0;
char str[40];
do{
gets(str);
for(i = 0, tamanho = 0 ; i < 30 ; i++){
if(str[i] == '\0'){
break;
}
tamanho++;
}
if(tamanho < 8){
printf("Tamanho inferior a 8 caracteres...");
}
}while(tamanho < 8);
return tamanho;
}
int main(){
char str[40];
gets(str);
conta_str(str);
return 0;
}
What exactly do you want to do? I also suggest you read the community guidelines on how to make a good question.
– user148754
Opa Paulo. So it is difficult to help you, edit your question and explain what you are trying to do and what mistake is happening.
– Evilmaax
You set your function with the parameter being a single character (char x) but call the function by passing an array of conta_str(str) characters, and your function does absolutely nothing with the parameter.
– anonimo
Excuse the ignorance gnt. I’m crawling in this world of programming.
– Paulo Maciel
@Paulomaciel read the link I sent you, come back here and correct!
– user148754