chapter 6.7 exists warning
sukai-cheng opened this issue · comments
苏凯 commented
苏凯 commented
Pls check my code,thanks for your time~
AC:
#include <stdio.h>
#include <string.h>
#define WORD_SIZE 26
int main (void)
{
char word[WORD_SIZE];
printf("Input a word:\n");
scanf("%s",word);
for( long i = strlen(word);i >= 0; i--){
printf("%c",word[i]);
}
printf("\n");
return 0;
}
zhayujie commented
会有类型强转的warning,你的写法更规范,已修改,多谢指正。
PS: 以前的代码比较粗糙,仅供参考哈 ^_^