题目:
Description
用结构体指针做参数,修改结构体变量的值。
#include <stdio.h>
#include <string.h>
struct student /* 定义结构体类型 */
{
char name[20];
long num;
char gender;
float score;
};
//begin
//end
int main( )
{
struct student stu = {"Lin Fang", 20150305, 'F', 98.0 }; /* 定义结构体变量 */
printf("%-10s %8d %2c %8.2f\n", stu.name, stu.num, stu.gender, s