C语言指针交换:代码分析及错误修正
#include 'stdio.h' int main() { int a,b, *p1,*p2,*p; a=1;b=2; p1=&a; p2= &b; if(a <b) { p=p1; p1=p2; p2=p; } printf('%d, %d ',a,b); return 0; }
输出结果为:2, 1
原文地址: https://www.cveoy.top/t/topic/ol59 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
#include 'stdio.h' int main() { int a,b, *p1,*p2,*p; a=1;b=2; p1=&a; p2= &b; if(a <b) { p=p1; p1=p2; p2=p; } printf('%d, %d ',a,b); return 0; }
输出结果为:2, 1
原文地址: https://www.cveoy.top/t/topic/ol59 著作权归作者所有。请勿转载和采集!