标签:std 变量 \n oid clu int include float main
#include <stdio.h>
struct Student
{
int age;
float score;
char sex;
};
int main(void)
{
struct Student st = {80, 66.6F, ‘F‘};
struct Student st2;
st2.age = 10;
st2.score = 88.8f;
st2.sex = ‘F‘;
struct Student *pst = &st;
st.age = 100;
pst->score = 99.9f;
(*pst).sex = ‘M‘;
printf("%d %f %c\n",st.age, pst->score, (*pst).sex);
printf("%d %f %c\n",st2.age, st2.score, st2.sex);
return 0;
}
标签:std 变量 \n oid clu int include float main
原文地址:https://www.cnblogs.com/bingyunbuxi/p/9903268.html