当前位置:网站首页>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 
边栏推荐
- Flex layout
- 突破性思维在测试工作中的应用
- Redis内存淘汰机制?
- [go basics 02] the first procedure
- ZigBee development board (nxpzigbee Development)
- Can I buy financial products with a revenue of more than 6% after opening an account
- Ts:typera code fragment indentation display exception (resolved) -2022.7.24
- Internship: writing common tool classes
- dovecot 设置邮箱quota
- Sofa weekly | open source person - Niu Xuewei, QA this week, contributor this week
猜你喜欢

Jmeter---设置代理录制请求

Jenkins+svn configuration

The automation testing post spent 20K recruiting, but in the end, there was no suitable one. Both fresh students are better than them

『Skywalking』.NET Core快速接入分布式链路追踪平台
![[dinner talk] those things that seem to be for the sake of the company but are actually incomprehensible (2: soft quality](/img/11/42c4674d23ee93850fb3d2de0d0932.png)
[dinner talk] those things that seem to be for the sake of the company but are actually incomprehensible (2: soft quality "eye edge" during interview)

在腾讯干软件测试3年,7月无情被辞,想给划水的兄弟提个醒...

On the difference between break and continue statements

MySQL - subquery - column subquery (multi row subquery)

虚拟内存与磁盘

Ansible+cronab batch deployment patrol
随机推荐
Wet- a good choice for people with English difficulties - console translation
Playwright tutorial (I) suitable for Xiaobai
自动化测试岗花20K招人,到最后居然没一个合适的,招两个应届生都比他们强吧
如何实现一个App应用程序,限制用户时间使用?
mysql: error while loading shared libraries: libncurses.so. 5: cannot open shared object file: No suc
Uninstall NPM and install NPM_ Use 'NPM uninstall' to uninstall the NPM package 'recommended collection'
如何将一个域名解析到多个IP地址?
JMeter websocket interface test
什么是分区分桶?
Minor GC 和 Full GC 有什么不同呢?
The file cannot be saved (what if the folder is damaged and cannot be read)
Redis是什么?简述它的优缺点
Ts:typera code fragment indentation display exception (resolved) -2022.7.24
面了个腾讯三年经验的测试员,让我见识到了真正的测试天花板
jenkins+SVN配置
Don't know mock test yet? An article to familiarize you with mock
What have I experienced to become a harder tester than development?
五种分配方式是否会产生内部碎片、外部碎片
SQL中in的用法 DQL 查询
Synchronized and volatile