C语言小结

 

 

1.输入输出:

char s;

printf("Enter a string");
scanf("%s",&s);
printf(''Hello,%s",s);

2.字符串

puts();

gets();

getchar();

fputs();

fgets();

strstr(s1,s2);

strcmp(s1,s2);

strcpy(s1,s2);

 

3.结构体

 

#define N 8

typedef struct student{
    long sno; //学号
    char num[N];//姓名
    float score[i];//成绩
}SST;
posted @ 2016-05-03 15:21  南湖鹄  阅读(148)  评论(0编辑  收藏  举报