关于fputs的问题
Write a program which asks user to enter 10 numbers and writes the numbersto a file "values.txt".
#include <stdio.h>
#include <stdlib.h>
#define MY_FILENAME "values.txt"
int main()
{
FILE *my_file;
int i=0;
char *num[10];
my_file=fopen(MY_FILENAME,"wt+");
printf("please enter numbers\n");
for (i=0;i<10 ;i++ )
{
scanf("%d\n",&num[i]);
}
fputs(num,my_file);
fclose(my_file);
return 0;
}
要输入10个数字,但是每次只能读出第一位的
而fputs的限制又是只能用字符数组名,不能用指针
请问要输入两个以上字符怎么解决呢