dudu.c
来自「花高价买来的arm的配套代码」· C语言 代码 · 共 19 行
C
19 行
#include <stdio.h>
static void display(int i, int *ptr);
int main(void)
{
int x = 5;
int *xptr = &x; //指针赋值
printf("In main():\n");
printf(" x is %d and is stored at %p.\n", x, &x);
printf(" xptr holds %p and points to %d.\n", xptr, *xptr);
display(x, xptr); //调用display函数
return 0;
}
void display(int z, int *zptr)
{
printf("In display():\n");
printf(" z is %d and is stored at %p.\n", z, &z);
printf(" zptr holds %p and points to %d.\n", zptr, *zptr);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?