当前位置:网站首页>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 
边栏推荐
- Victoriametrics single node of kubernetes
- H5幸运刮刮乐抽奖 免公众号+直运营
- Jenkins+svn configuration
- Wet- a good choice for people with English difficulties - console translation
- What should I do if I encounter the problem of verification code during automatic testing?
- c sqlite ... ...
- 8000 word super detailed custom structure type
- QML module not found
- 突破性思维在测试工作中的应用
- Playwright tutorial (II) suitable for Xiaobai
猜你喜欢

Playwright tutorial (I) suitable for Xiaobai

动画曲线天天用,你能自己整一个吗?看完这篇你就会了!

『SignalR』.NET使用 SignalR 进行实时通信初体验

Nuclear power plants strive to maintain safety in the heat wave sweeping Europe

6-17 vulnerability exploitation - deserialization remote command execution vulnerability

JMeter websocket接口测试

核电站在席卷欧洲的热浪中努力保持安全工作

如何实现一个App应用程序,限制用户时间使用?

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

字节跳动技术面都过了,结果还是被刷了,问HR原因竟是。。。
随机推荐
Can I buy financial products with a revenue of more than 6% after opening an account
Square root of X
Internship: writing common tool classes
The technical aspects of ByteDance are all over, but the result is still brushed. Ask HR why...
VIM usage record
YUV420 yuv420sp image format "recommended collection"
Wechat applet application development competition works comprehensive development record - Jinlu cultural tourism (cloud development - Overview)
Victoriametrics single node of kubernetes
手机端微信发朋友圈功能测试点总结
磁盘空间的三种分配方式
五种分配方式是否会产生内部碎片、外部碎片
[51nod1676 undirected graph isomorphism] undirected graph hash [easy to understand]
How to quickly build a picture server [easy to understand]
Dovecot set mailbox quota
Golang: MVC models
kubernetes之VictoriaMetrics单节点
JSP初识
2年功能测试,却感觉自己什么都不会,2022我该何去何从?
文件无法保存(文件夹已损坏无法读取怎么办)
How to solve the problem of using the download Plug-in for export?