Created
May 11, 2024 23:05
-
-
Save rafaelmegda/a0575b60a849dbc33f64d28c1fe74328 to your computer and use it in GitHub Desktop.
Este código é possível contar a quantidade de caracteres a partir do que foi digitado
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Com este código o usuario consegue digitar a palavra que deseja contar seus caracteres*/ | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
int main(){ | |
char *nome; | |
nome = malloc(sizeof(nome)); | |
printf("Digite um Nome para Contar os Caracteres\n>> "); | |
scanf("%s", nome); | |
printf("\nTotal de Caracteres: %d\n" , strlen(nome)); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment