当前位置:网站首页>Title: give a group of arrays, arranged from large to small and from small to large.
Title: give a group of arrays, arranged from large to small and from small to large.
2022-07-25 22:11:00 【Xiaotang blog】
subject : Give a set of arrays , Arrange from large to small and from small to large .
Write first C The structure of language
#include <stdio.h>
int main()
{
//C Basic structure of language
return 0;
}
First step : First define a set of arrays
#include <stdio.h>
int main()
{
int a[10];// there 10 Represents size ,
int data;
return 0;
}
The second step : Get into C The cycle of language ( Complete code )
#include <stdio.h>
int main()
{
int a[10];// there 10 Represents size ,
int data;
for(data=0;data<=9;data++){
a[data]=data*1;
}
printf(" Array initialization complete \n");
for(data=0;data<=9;data++){
printf(" In positive order address:%p,data:%d\n",&a[data],a[data]);// hold data Print out the address and value of
}
printf("\n");
// In reverse order
for(data=9;data>=0;data--){
a[data]=data*1;
}
for(data=9;data>=0;data--){
printf(" In reverse order address:%p,data:%d\n",&a[data],a[data]);
}
printf("done\n");
return 0;
}
Running results 
边栏推荐
- Which is reliable between qiniu business school and WeiMiao business school? Is it safe to open an account recommended by the teacher?
- 6-18 vulnerability exploitation - backdoor connection
- Why does redis choose single thread?
- Redis foundation 2 (notes)
- Mouseevent event -- mouse coordinate description -- Focus event -- input event -- throttle -- mousewheel (wheel event)
- 信息安全建设原则指导
- Children's programming electronic society graphical programming level examination scratch level 1 real problem analysis (judgment question) June 2022
- Square root of X
- 2年功能测试,却感觉自己什么都不会,2022我该何去何从?
- 『Skywalking』.NET Core快速接入分布式链路追踪平台
猜你喜欢

JMeter websocket接口测试

8000 word super detailed custom structure type

还不懂mock测试?一篇文章带你熟悉mock

Animation curves are used every day. Can you make one by yourself? After reading this article, you will!

数据库进阶·如何针对所有用户数据中没有的数据去加入随机的数据-蜻蜓Q系统用户没有头像如何加入头像数据-优雅草科技kir

jenkins+SVN配置

Basic knowledge in the project

kubernetes之VictoriaMetrics单节点

2年功能测试,却感觉自己什么都不会,2022我该何去何从?

Wechat applet application development competition works comprehensive development record - Jinlu cultural tourism (cloud development - Overview)
随机推荐
手机端微信发朋友圈功能测试点总结
Wet- a good choice for people with English difficulties - console translation
Nuclear power plants strive to maintain safety in the heat wave sweeping Europe
c sqlite ... ...
Redis master-slave architecture lock failure problem (master-slave)
Sofa weekly | open source person - Niu Xuewei, QA this week, contributor this week
Can I buy financial products with a revenue of more than 6% after opening an account
[assembly language 01] basic knowledge
Redis foundation 2 (notes)
『Skywalking』.NET Core快速接入分布式链路追踪平台
Basic knowledge in the project
文件无法保存(文件夹已损坏无法读取怎么办)
The file cannot be saved (what if the folder is damaged and cannot be read)
Special class design
kubernetes之VictoriaMetrics单节点
成为比开发硬气的测试人,我都经历了什么?
JSP nine built-in objects
How is it most convenient to open an account for stock speculation? Is it safe for online account managers to open an account
Playwright tutorial (II) suitable for Xiaobai
虚拟内存与磁盘