C语言实验报告指针(二)6,C语言实验报告——指针.doc

C语言实验报告——指针

实验6 指 针

姓名:刘磊 学号:1100530124 实验日期实验目的和要求

(1)掌握指针的概念、指针变量定义格式和引用。

(2)掌握指针的运算方法。

(3)掌握数组的指针和指向数组的指针变量。

(4)掌握指针与函数的关系。

(5)能正确使用字符串的指针和指向字符串的指针变量。

(6)了解指向函数的指针。

(7)了解指向指针变量的指针。

实验内容:实验指导书中的实验九。

实验步骤

9.1 调试程序,找出程序的错误。

9.2 运行程序:

9.3 修改程序错误,并运行。

9.4. 程序填空:

9.5. 程序填空:

#include

main()

{

int a[5][5]={0},*p[5],i,j;

for(i=0; i<5; i++) p[i]= &a[i][0] ;

for(i=0; i<5; i++)

{*(p[i]+ i) =1;

*(p[i]+5- (i+1)) =1;

}

for(i=0; i<5; i++)

{

for(j=0; j<5; j++)

printf("%2d", p[i][j]);

;

}

}

9.6 编程(选作)

运行结果(请帖图):

97. 运行程序(选作):

4、实验心得:

指针是很好的工具,是的程序更加灵活。但是在使用的时候,要注意指针使用的规则,一定要初始化指针,掌握指针的单向传递规律,辨析实参与形参之间变量传递的方向性。而且指针不能滥用

to prevent the accumulation of air, both ends of the tube are required the Center to bake. 6.2.5 sets should be at the bottom 200mm lashing cable head is fixed rung, with a similar cable color of plastic lashings. Cable head using "equal-width stacked" layout, or according to the size and space within the enclosure cable volume adjust, but you must ensure uniform, neat and elegant. 6.2.6 disc cabinet within cable shield layer requirements

to prevent the accumulation of air, both ends of the tube are required the Center to bake. 6.2.5 sets should be at the bottom 200mm lashing cable head is fixed rung, with a similar cable color of plastic lashings. Cable head using "equal-width stacked" layout, or according to the size and space within the enclosure cable volume adjust, but you must ensure uniform, neat and elegant. 6.2.6 disc cabinet within cable shield layer requirements

to prevent the accumulation of air, both ends of the tube are required the Center to bake. 6.2.5 sets should be at the bottom 200mm lashing cable head is fixed rung, with a similar cable color of plastic lashings. Cable head using "equal-width stacked" layout, or according to the size and space within the enclosure cable volume adjust, but you must ensure uniform, neat and elegant. 6.2.6 disc cabinet within cable

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值