0
#include <stdio.h>
#include <cs50.h>
#include <string.h>
#include <ctype.h>
int main(int argc, string argv[])
{
for (int i = 0; i < argc; i++)
{
printf ("%c", toupper(argv[i][0]));
}
printf ("\n");
}
它應該把你的全名並返回你的首字母縮寫。它返回它應該的內容,除了它始終返回輸出之前的一段時間。我的輸出始終打印'。'在我預期的產出之前。 CS50 PSET2
'int i = 0' - >'int i = 1' – BLUEPIXY
argv [0]對應於可執行文件的名稱。所以,從1開始。 –