c语言中如何将多个字符串存在同一个数组里?请举例说明,跪求大侠了...答:用字符串数组,或者叫字符二维数组。例如下句,定义一个10个字符串的字符串数组并赋初值,char *test[10] = {"jo","vicent","tom","honey","gigi","lily","susan","peter","bob","ron"};
C语言,C语言! 输入一个正整数n(1<n<=10),再输入n个整数,将它们存入数 ...答:include <stdio.h>void main(){int i,n,k=0,max,a[10];printf("输入正整数n(n大于1且不大于10): ");scanf("%d",&n);printf("输入%d个整数: ",n);scanf("%d",&a[0]);max=a[0];for(i=1;i<n;i++){scanf("%d",&a[i]);if(max...
C语言中怎么把文件中的数据赋到结构体的成员中?答:memset((void *)&stu, 0, sizeof(struct student));cp_content(fp, buf, "姓名:", stu.name);memset(buf, 0, SIZE);cp_content(fp, buf, "性别:", stu.sex);memset(buf, 0, SIZE);cp_content(fp, buf, "年龄:", stu.age);printf("stu.name = %s, stu.sex = %s, stu.age...