指针数组

上传人:jiups****uk12 文档编号:45503048 上传时间:2018-06-17 格式:PPT 页数:22 大小:288.50KB
返回 下载 相关 举报
指针数组_第1页
第1页 / 共22页
指针数组_第2页
第2页 / 共22页
指针数组_第3页
第3页 / 共22页
指针数组_第4页
第4页 / 共22页
指针数组_第5页
第5页 / 共22页
点击查看更多>>
资源描述

《指针数组》由会员分享,可在线阅读,更多相关《指针数组(22页珍藏版)》请在金锄头文库上搜索。

1、华南理工大学计算机学院 周霭如 2006 指针数组的元素类型是指针 指针数组的元素存放对象的地址指针数组说明形式为:类型 * 标识符 表达式 ; 例如:int * pi 3 ;float * pf 5 ;char *char * psps 10 ; 10 ;/数组元素是关联类型为整型的指针/数组元素是关联类型为浮点型的指针/数组元素是关联类型为字符型的指针华南理工大学计算机学院 周霭如 2006/ 例测试指针数组 #includevoid main() int a = 11 , b = 22 , c = 33 , * pi 3 ;pi 0 = pi 1 = pi 2 = for( int i

2、= 0; i void main() int a = 11 , b = 22 , c = 33 , * pi 3 ;pi 0 = pi 1 = pi 2 = for( int i = 0; i void main() int a = 11 , b = 22 , c = 33 , * pi 3 ;pi 0 = pi 1 = pi 2 = for( int i = 0; i void main() int a = 11 , b = 22 , c = 33 , * pi 3 ;pi 0 = pi 1 = pi 2 = for( int i = 0; i void main() double aa 2

3、 = 1.1, 2.2 ;double bb 2 = 3.3, 4.4 ;double cc 2 = 5.5, 6.6 ;double ( * pf 3 ) 2 ;pf 0 = pf 1 = pf 2 = for ( int i = 0 ; i void main() double aa 2 = 1.1, 2.2 ;double bb 2 = 3.3, 4.4 ;double cc 2 = 5.5, 6.6 ;double ( * pfpf 33 ) 2 ;pf 0 = pf 1 = pf 2 = for ( int i = 0 ; i void main() double aa 2 = 1.

4、1, 2.2 ;double bb 2 = 3.3, 4.4 ;double cc 2 = 5.5, 6.6 ;double ( * * pfpf 33 ) 2 ;pf 0 = pf 1 = pf 2 = for ( int i = 0 ; i void main() double aa 2 = 1.1, 2.2 ;double bb 2 = 3.3, 4.4 ;double cc 2 = 5.5, 6.6 ;doubledouble ( ( * * pfpf 33 ) ) 22 ;pf 0 = pf 1 = pf 2 = for ( int i = 0 ; i void main() dou

5、ble aa 2 = 1.1, 2.2 ;double bb 2 = 3.3, 4.4 ;double cc 2 = 5.5, 6.6 ;double ( * * pf 3 ) 2 ;pf 0 = pf 1 = pf 2 = for ( int i = 0 ; i void main() double aa 2 = 1.1, 2.2 ;double bb 2 = 3.3, 4.4 ;double cc 2 = 5.5, 6.6 ;double ( * * pf 3 ) 2 ;pf 0 = pf 1 = pf 2 = for ( int i = 0 ; i void main() double

6、aa 2 = 1.1, 2.2 ;double bb 2 = 3.3, 4.4 ;double cc 2 = 5.5, 6.6 ;double ( * * pf 3 ) 2 ;pf 0 = pf 1 = pf 2 = for ( int i = 0 ; i void main() double aa 2 = 1.1, 2.2 ;double bb 2 = 3.3, 4.4 ;double cc 2 = 5.5, 6.6 ;double ( * * pf 3 ) 2 ;pf 0 = pf 1 = pf 2 = for ( int i = 0 ; i void main() double aa 2

7、 = 1.1, 2.2 ;double bb 2 = 3.3, 4.4 ;double cc 2 = 5.5, 6.6 ;double ( * * pf 3 ) 2 ;pf 0 = pf 1 = pf 2 = for ( int i = 0 ; i void main() double aa 2 = 1.1, 2.2 ;double bb 2 = 3.3, 4.4 ;double cc 2 = 5.5, 6.6 ;double ( * * pf 3 ) 2 ;pf 0 = pf 1 = pf 2 = for ( int i = 0 ; i void main() double aa 2 = 1

8、.1, 2.2 ;cout void main() double aa 2 = 1.1, 2.2 ;double bb 2 = 3.3, 4.4 ;double cc 2 = 5.5, 6.6 ;double ( * * pf 3 ) 2 ;pf 0 = pf 1 = pf 2 = for ( int i = 0 ; i void main() double aa 2 = 1.1, 2.2 ;double bb 2 = 3.3, 4.4 ;double cc 2 = 5.5, 6.6 ;double ( * * pf 3 ) 2 ;pf 0 = pf 1 = pf 2 = for ( int

9、i = 0 ; i void main() double aa 2 = 1.1, 2.2 ;double bb 2 = 3.3, 4.4 ;double cc 2 = 5.5, 6.6 ;double ( * * pf 3 ) 2 ;pf 0 = pf 1 = pf 2 = for ( int i = 0 ; i void main() double aa 2 = 1.1, 2.2 ;double bb 2 = 3.3, 4.4 ;double cc 2 = 5.5, 6.6 ;double ( * * pf 3 ) 2 ;pf 0 = pf 1 = pf 2 = for ( int i =

10、0 ; i void main() double aa 2 = 1.1, 2.2 ;double bb 2 = 3.3, 4.4 ;double cc 2 = 5.5, 6.6 ;double ( * * pf 3 ) 2 ;pf 0 = pf 1 = pf 2 = for ( int i = 0 ; i void main() double aa 2 = 1.1, 2.2 ;double bb 2 = 3.3, 4.4 ;double cc 2 = 5.5, 6.6 ;double ( * pf 3 ) 2 ;pf 0 = pf 1 = pf 2 = for ( int i = 0 ; i void main() double aa 2 = 1.1, 2.2 ;double bb 2 = 3.3, 4.4 ;double cc 2 = 5.5, 6.6 ;double ( * pf 3 ) 2 ;pf 0 = pf 1 = pf 2 = for ( int i = 0 ; i 3 ; i + ) for ( int j = 0 ; j 2 ; j + )cout * ( * pf i + j ) “ “ ;cout endl ;cout “i=“iendl; ;/错误cout “j=“jendl; ;/错误 int j = 0;for (; j 3 ; j + )

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 行业资料 > 其它行业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号