We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 92a737e commit 7b22157Copy full SHA for 7b22157
src/c/Palindromo.c
@@ -1,7 +1,7 @@
1
#include <stdio.h>
2
#include <string.h>
3
4
-#define TAMANHO_MAX_PALAVRA 100
+#define MAX_SIZE_WORD 100
5
6
void calc_reverse(char *input, char *output) {
7
size_t len_input = strlen(input);
@@ -15,13 +15,13 @@ void calc_reverse(char *input, char *output) {
15
}
16
17
int main() {
18
- char input[TAMANHO_MAX_PALAVRA];
19
- char reverse[TAMANHO_MAX_PALAVRA];
+ char input[MAX_SIZE_WORD];
+ char reverse[MAX_SIZE_WORD];
20
21
printf("Digite uma palavra: ");
22
23
- fgets(input, TAMANHO_MAX_PALAVRA, stdin);
24
- //remove New Line from the end;
+ fgets(input, MAX_SIZE_WORD, stdin);
+ //remove New Line from the end
25
input[strlen(input) - 1] = '\0';
26
27
calc_reverse(input, reverse);
0 commit comments