摘要:
#include<stdio.h>void swap(int *px, int *py){ int temp; temp = *px; *px = *py; *py =temp;}int main(int argc,char **argv) { int x = 1, y = 2; printf("x,y is %d,%d\n",x,y); swap(&x,&y); /* int *px = &x; int *py = &y; swap(px,py); */ printf("x,y is %d,%d\n",x,y 阅读全文
摘要:
#include<stdio.h>#include<stddef.h>int main(int argc,char **argv) { char c; char *p = &c; printf("len of char is %d\n",sizeof *p); int x = 1, y = 2, z[10]={8,22,33}; int *ip = &x; printf("x,y is %d,%d\n",x,y); y= *ip; printf("x,y is %d,%d\n",x,y); *i 阅读全文