l32.1a

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 1A 代码 · 共 51 行

1A
51
字号
#printWrite a program   pair(a,b)which accepts as arguments two pointers to integersand swaps the integers if necessary so that thefirst argument points to the larger one; that is	int x,y;	x = 9;	y = 15;	pair( &x, &y);results in x being 15 and y 9.  Leave the programon file "pair.c"; compile, test it, and type "ready".#once #create tzaqc.cmain(){	int x,y;	y=200;	x = 0;	pair(&y, &x);	if (x != 0 || y != 200) 		return(1);	pair(&x,&y);	if (x != 200 || y != 0) 		return(1);	x = 30;	y = 23097;	pair(&x,&y);	if (x != 23097 || y !=  30) 		return(1);	return(0);}#usercc tzaqc.c pair.oa.out #succeedpair(a, b)int *a, *b;{	int t;	if (*a <= *b) {		t = *a;		*a = *b;		*b = t;	}}#log#next33.1a 10

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?