文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > 高等教育 > 工学 > 大连东软信息学院大一上 电子工程 c语言-实验第六次,第十二周
侵权投诉

大连东软信息学院大一上 电子工程 c语言-实验第六次,第十二周

Lab7 Pointers

OBJECTIVES

After completing this experiment, you will be able to:

Understand pointers fundamentals

Understand functions and pointers

Pass arrays to functions

Use pointers to One-Dimensional Arrays

PROCEDURES

1. What format speci ers (in order) should be used in the printf() statement in the following program? Note that in the program the correct format speci ers have been replaced by Z.

#include <stdio.h>

int main(void)

{

int x = 5;

int *x_ptr = &x;

printf("%Z, %Z, %Z, %Z\n", x, *x_ptr, &x, x_ptr);

}

Your answers:(2 Marks)

%d,%d,%p,%p

——————————————————

大连东软信息学院大一上 电子工程 c语言-实验第六次,第十二周

Print Screen of Result: (3 Marks)

2. On a machine in which addresses are 2 bytes, what is printed by the following program: #include <stdio.h>

第1页

你可能喜欢

热门文档

相关文档

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email