指针常见定义
来源:互联网 发布:excel如何去重复数据 编辑:程序博客网 时间:2024/06/02 21:19
再给出常用的C变量的定义方式:
a) 一个整型数(An integer)
b) 一个指向整型数的指针(A pointer to an integer)
c) 一个指向指针的的指针,它指向的指针是指向一个整型数(A pointer to a pointer to an integer)
d) 一个有10个整型数的数组(An array of 10 integers)
e) 一个有10个指针的数组,该指针是指向一个整型数的(An array of 10 pointers to integers)
f) 一个指向有10个整型数数组的指针(A pointer to an array of 10 integers)
g) 一个指向函数的指针,该函数有一个整型参数并返回一个整型数(A pointer to a function that takes an integer as an argument and returns an integer)
h) 一个有10个指针的数组,该指针指向一个函数,该函数有一个整型参数并返回一个整型数( An array of ten pointers to functions that take an integer argument and return an
a) 一个整型数(An integer)
b) 一个指向整型数的指针(A pointer to an integer)
c) 一个指向指针的的指针,它指向的指针是指向一个整型数(A pointer to a pointer to an integer)
d) 一个有10个整型数的数组(An array of 10 integers)
e) 一个有10个指针的数组,该指针是指向一个整型数的(An array of 10 pointers to integers)
f) 一个指向有10个整型数数组的指针(A pointer to an array of 10 integers)
g) 一个指向函数的指针,该函数有一个整型参数并返回一个整型数(A pointer to a function that takes an integer as an argument and returns an integer)
h) 一个有10个指针的数组,该指针指向一个函数,该函数有一个整型参数并返回一个整型数( An array of ten pointers to functions that take an integer argument and return an
integer )
答案是:
a) int a; // An integer
b) int *a; // A pointer to an integer
c) int **a; // A pointer to a pointer to an integer
d) int a[10]; // An array of 10 integers
e) int *a[10]; // An array of 10 pointers to integers
f) int (*a)[10]; // A pointer to an array of 10 integers
g) int (*a)(int); // A pointer to a function a that takes an integer argument and returns an integer
h) int (*a[10])(int); // An array of 10 pointers to functions that take an integer argument and return an integer
- 指针常见定义
- 常见指针定义解读
- c语言—指针基础(4:字符串常见定义方式)
- 指针定义
- 定义指针
- 指针定义
- Linux常见定义记录
- 常见的全局变量定义
- 微积分的常见定义
- 常见宏定义
- iOS常见宏定义
- IDA常见宏定义
- 定义const 型指针
- typedef定义函数指针
- typedef 定义函数指针
- 定义const 型指针
- typedef定义函数指针
- typedef 定义函数指针
- 替代three20的一个框架
- Android中的前置服务
- 浅谈web指纹识别技术
- poll 的例子
- 求两个字符串的最长公共子串
- 指针常见定义
- 求两个字符串最长公共子串(LCS问题) 两种思想
- ACM2012长春赛区网络赛——1011
- js 逻辑运算&& ||
- 浅谈网络营销
- 实现Http Server
- C语言实现打印各种菱形
- python算法
- files list file for package '*****' is missing final newline的解决