//结构体与指针
#include<string.h>
#include<stdio.h>
struct student
{
int number;
char name[10];
};
void main()
{
struct student a;
struct student *ptr=&a;
a.number=10;//ptr->number=10;
strcpy(a.name,"li");//strcpy(ptr->name,"li");
printf("%d,%d ",a.number,(*ptr).number);
//(*ptr).number <=> ptr->number
}
标签:10,计算机软件,复习,struct,number,student,2008,ptr,name
From: https://blog.51cto.com/emanlee/8245207