当前位置:网站首页>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 
边栏推荐
- JSP novice
- Can I buy financial products with a revenue of more than 6% after opening an account
- Children's programming electronic society graphical programming level examination scratch level 1 real problem analysis (judgment question) June 2022
- golang : MVC之models
- 什么是类加载?类加载的过程?
- MySQL - subquery - column subquery (multi row subquery)
- 6-18 vulnerability exploitation - backdoor connection
- Whether the five distribution methods will produce internal fragments and external fragments
- Jmeter---设置代理录制请求
- How is it most convenient to open an account for stock speculation? Is it safe for online account managers to open an account
猜你喜欢

Imitation Tiktok homepage interface

Jmeter--- set proxy recording request

3. Editors (vim)

Children's programming electronic society graphical programming level examination scratch level 1 real problem analysis (judgment question) June 2022

TS:typora代码片段缩进显示异常(已解决)-2022.7.24

『Skywalking』.NET Core快速接入分布式链路追踪平台

Don't know mock test yet? An article to familiarize you with mock

The second short contact of gamecloud 1608

How to implement an app application to limit users' time use?

手机端微信发朋友圈功能测试点总结
随机推荐
Fill the whole square with the float property
C语言:随机生成数+选择排序
JSP nine built-in objects
虚拟内存与磁盘
kubernetes之VictoriaMetrics单节点
还不懂mock测试?一篇文章带你熟悉mock
Summary of function test points of wechat sending circle of friends on mobile terminal
Playwright tutorial (II) suitable for Xiaobai
Tesseract OCR初探
测试工作不受重视,你换位思考了吗?
Redis为何选择单线程?
『SignalR』.NET使用 SignalR 进行实时通信初体验
[hand tear STL] BitSet (bitmap), bloom filter
SQL基本语句 DQL select与提取 DML插入删除
Golang: MVC models
什么是类加载?类加载的过程?
Jenkins+svn configuration
QML module not found
2022 love analysis ― bank digitalization practice report
The second short contact of gamecloud 1608