#include<stdio.h>
int main() {
int a = 10;
int b = 20;
int c = 30;
int* arr[] = {
&a,&b,&c };
//指针数组,本质上是数组,存放的是指针的。
int sz = sizeof(arr) / sizeof(arr[0]);
for (int i = 0; i < sz; i++)
{
printf("%d\n", *(arr[i]));//10 20 30
}
}
C语言:指针数组。
猜你喜欢
转载自blog.csdn.net/weixin_45275802/article/details/112584998
今日推荐
周排行