#include
#include
#include
struct stu{
char name[5];
int id;
char sex[10];
};
void test(stu* who){
who->id=23;
*(who)->name=”bhj”;
*(who)->sex=”dkh”;
printf(“%d %s %s\n”,who->id,who->name,who->sex);
}
int main(){
stu s1={“a”,12,”m”};
test(&s1);
return 0;
}
可以帮本人解答一下吗?谢谢高手了
解决方案
10
#include
#include
#include
struct stu{
char name[5];
int id;
char sex[10];
};
void test(struct stu *who){
who->id=23;
who->name[0]="b"