C语言返回值指针的函数详解

来自:互联网
时间:2022-03-01
阅读:

C语言返回值指针的函数详解

 C语言返回值指针的函数详解

 C语言返回值指针的函数详解

 C语言返回值指针的函数详解

C语言返回值指针的函数详解

C语言返回值指针的函数详解

C语言返回值指针的函数详解

#include<stdio.h>
void main()
{
	int a[5] = { 1,3,5,7,9 };
	int* name[5] = { &a[0],&a[1],&a[2] ,&a[3] ,&a[4] };
	int i;
	for (i = 0; i < 5; i++)
	{
		printf("%d ", *name[i]);
	}
	printf("\n\n");
}

C语言返回值指针的函数详解

C语言返回值指针的函数详解

C语言返回值指针的函数详解

C语言返回值指针的函数详解

C语言返回值指针的函数详解

C语言返回值指针的函数详解

C语言返回值指针的函数详解

#include<stdio.h>
void main()
{
	char *name[] = { "as","az", "ax", "ac", "af" };
	char** p;
	int i;
	for (i = 0; i < 5; i++)
	{
		p = name + i;
		printf("%s\n", *p);
	}
}

C语言返回值指针的函数详解

C语言返回值指针的函数详解

C语言返回值指针的函数详解

总结

本篇文章就到这里了,希望能够给你带来帮助,也希望您能够多多关注的更多内容! 

返回顶部
顶部