标签:[] \n argv printf func char s 指针 nbsp %s
#include <stdio.h>
void function1()
{
printf("函数一 没有参数和 返回值");
}
void function2(char str[2222])
{
printf("%s 函数二 有参数 无返回值", str);
}
int function3(int a, int b)
{
printf("函数三 有参数和返回值");
return a + b;
}
int function4(int a,int b)
{
return a * b;
}
int main(int argc, char* argv[])
{
void(*p1)() = function1;
void(*p2)(char[]) = function2;
int(*p3)(int, int) = function3;
int(*p4[])(int, int) = { function4,function3 };
printf("p4 = %d \n", p4[0](2, 3));
printf("p3 = %d \n", p4[1](2, 3));
getchar();
return 0;
}
标签:[] \n argv printf func char s 指针 nbsp %s
原文地址:https://www.cnblogs.com/sinianxinfei/p/9216077.html