Skip to content

Latest commit

 

History

History
28 lines (25 loc) · 268 Bytes

87.md

File metadata and controls

28 lines (25 loc) · 268 Bytes

题目:回答结果(结构体变量传递)。

#include<stdio.h>

struct student
{
	int x;
	char c;
} a;

void f(struct student b)
{
	b.x = 555;
	b.c = 'w';
}

int main()
{
	a.x = 4;
	a.c = 'b';
	f(a);
	printf("%d,%c", a.x, a.c);
}

结果:

4,b