怎么用scanf ()把一个字符串读入一个数组

如题所述

第1个回答  2016-12-13
#include <stdio.h>
#include <string.h>
#define SIZE 255
int main (void)
{
char array[SIZE];
int i,index;
char lets;
printf ("Enter words: ");

scanf ("%s",array);
printf ("%s\n",array);

return 1;

}

这样就好了。本回答被网友采纳