コードが argv[] 文字列を受け入れないのはなぜですか? 修正するにはどうすればよいですか? 小文字と大文字の両方を入力して、配列に小文字のみを入力できるようにしたいと考えています。助けてくれてありがとう。
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
int main(int argc, char argv[])
{
char word[30]= atoi(argv[1]); // here is the input
for (int i = 0; word[i]; i++)
word[i] = tolower(word[i]);
printf("Here is the new word: %s\n", word);
return 0;
}