- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
实验8.1 指针与数组(Experiment 8.1 pointer and array)
实验8.1 指针与数组(Experiment 8.1 pointer and array)
Experiment 8.1 and array
Title information table
Title of the serial number title
1 circular movement (debug sample error08_1)
Find the specified element in the array
Use function selection to sort
4 number off
1 circular movement (debug sample error08_1)
# include stdio, h
Int main (void)
{
Int I, m, n, k, j.
Int a, [80].
The scanf ( % d % d , n, m);
For (I = 0; I n; I + +)
The scanf ( % d , a [I]);
For (I = 0; I m; i++) {
K = a, [n - 1].
For (j = n - 1; j 0; j --)
A [j] = a, [1].
A [0] = k;
}
/ * -- - program fill in the blank, dont change the statements associated with the input output.
Enter two positive integers n and m (1 m = 10), then enter n integers, line up these Numbers, and move the m position to the right (moving the number from the right to the left),
The last output is the NTH integer that is moved.
To define and call function mov (x, n, m) to realize the function of the above circular movement, the type of function parameter x is the integer pointer, the type of parameter n and m is int, and the type of function is void.
An example of the input output: an illustration in parentheses
Input:
3 (n = 5, 5 m = 3)
1, 2, 3, 4, 5 (5 integers)
Output:
After move: 3, 4, 5, 1, 2
-- * /
Printf ( After a move: );
For (I = 0; I n; I + +)
Printf ( % d , a [I]);
Printf ( \ n );
Return 0;
}
Find the specified element in the array
# include stdio, h
Int main (void)
{
Int I, n, res, x;
Int repeat, ri;
Int a, [10].
The scanf ( % d , repeat);
For (ri = 1; ri = repeat; r + +) {
The scanf ( % d , n);
For (I = 0; I n; I + +)
The scanf ( % d , a [I]);
The scanf ( % d , x);
Res = 1;
For (I = 0; I n; i++)
If (a = = x [I]) {
Res = I;
Break;
}
/ * - fill in the blanks without changing the statements associated with the input output.
Enter a positive integer repeat (0 repeat 10) and do the following operation:
Enter a positive integer n (1 = 10), then input n integers into array a, then enter an integer x, find
您可能关注的文档
- 免输入yes进行OpenSSH known_hosts添加(Enter yes for OpenSSH known_hosts).doc
- 光盘类型(Disc type).doc
- 光钎放大器说明书(The optical bit amplifier specification).doc
- 光纤放大器中光脉冲传输特性的影响(Influence of optical pulse transmission characteristics in optical fiber amplifier).doc
- 党报理论版要有创新的形式和内容(Party newspaper theory edition should have innovative form and content).doc
- 党章学习心得(Party constitution learning experience).doc
- 兢兢业业,实干为真——记寨里中心小学曹亚荣老师(Conscientiously, it is true -- the village center primary school, cao yron).doc
- 全世界199个国家首都坐标(The coordinates of the capital of 199 countries around the world).doc
- 全国计算机等级考试三级B类笔试试题(96年4月)(National computer rank examination level 3 B test paper (April 96)).doc
- 全方位信息管理让城市生活更聪明(Omnidirectional information management makes city life more smart).doc
- 实验一 单调谐高频小信号放大器(Experiment a single-tuned high-frequency small signal amplifier).doc
- 实验一 数据库的建立和维护(The establishment and maintenance of a database).doc
- 实验一(一) 熔点的测定(毛细管法)(Determination of melting point (capillary method)).doc
- 实验三 三点法测量二端口微波网络的散射参数(The scattering parameters of the two - port microwave network are measured by three - three - point method).doc
- 实验介绍_迈克尔逊(An introduction to the experiment).doc
- 实验三 多级放大器与负反馈放大器(The three - stage amplifier and the negative feedback amplifier).doc
- 实验五STC15系列单片机快速控制比例双惯性对象的PID控制程序(Experiment 5 STC15 series single-chip microcomputer fast control the PID control program of the dual inertial object).doc
- 实验室和生物安全柜的火焰安全(Fire safety of laboratory and biosafety cabinet).doc
- 实验设计解题三步曲(Experiment design the three steps).doc
- 室内塑料排水管道安装(Indoor plastic drainage pipe installation).doc
最近下载
- (新课标)人教版小学劳动教育五年级上册第一章劳动项目2《煮面条》教学设计.doc
- 副县长在县委理论学习中心组学习会上的发言(党的作风建设的重要论述).doc VIP
- 注射水纯水纯蒸汽施工方案.pdf VIP
- 2025年全国中小学校党组织书记网络培训示范班在线考试题库及答案.docx VIP
- 电力新能源知识培训课件.pptx VIP
- 电气运行、检修、事故处理、安全操作规程(电气五大规程).docx
- 《矿山隐蔽致灾因素普查规范 大纲》.doc VIP
- 新概念英语第一册 Lesson 21-22课件.ppt VIP
- 2025贵州遵义南国大数据有限公司招聘100人笔试模拟试题及答案解析.docx VIP
- 网信体系下 网络舆情应对流程指南.docx VIP
文档评论(0)