当前位置:网站首页>Chengdu test equipment development_ Array introduction of C language for single chip microcomputer
Chengdu test equipment development_ Array introduction of C language for single chip microcomputer
2022-06-22 14:19:00 【u010755676】
Chengdu test equipment development Co., Ltd _ Single chip microcomputer C Introduction to the array of languages
SO Technology sharing 34
This article introduces about C Language array related knowledge , Such as array definition 、 Application of array 、 Array usage, etc .
What is an array ?
Array (Array) Is an ordered sequence of elements .
An array is a collection of data of the same type . An array can be decomposed into multiple array elements , Elements can be found with labels . Arrays can have one-dimensional arrays , Two dimensional array ……N Dimension group .
What's the use of arrays ?
Look up the table : When determining one or more dimensions ( Or labelling ) after , To find and obtain data from another dimension or dimensions ;
It is convenient to call several similar data : Such as , Use several similar variables , One way is to define multiple variables separately , Another way is to define an array , Manipulate arrays with labels . Obviously arrays are simpler .
other .
To define an array

Arrays need to be defined before being used , Format bits defined by the array : Definer Array name + Array dimensions .
The definer is used to determine the data type of array elements , Such as character (char)、 plastic (int)、 Long integer (long) etc. .
Array name is the name of the array , When calling arrays in the program, you need to use .
Dimension is to group and size arrays .
Use of arrays

Before using an array, you need to define .
Array assignment will be used . Array assignment is usually done in the process program , Assignment can be done directly by assignment expression , An element of the array is placed to the left of the equal sign . You can give values directly , Or give variable expressions .
Array queries are also used . For example, take an element of the array to judge 、 Calculation, etc . Array queries also use assignment expressions , The array elements to be queried are placed to the right of the equal sign .
Summary
Arrays are generally used for the use and processing of large quantities of data , Using arrays will save code , It will make the program simpler and easier .
At the end of this section , Wonderful to be continued .
边栏推荐
- 3dMax建模笔记(一):介绍3dMax和创建第一个模型Hello world
- Aliyundrive fuse that allows jellyfin to directly mount alicloud disks
- Tables converting to latex format
- STM32F1与STM32CubeIDE编程实例-光断续传感器驱动
- 论文专利博客写作总结
- 安装和使用protobuf-c
- Talk about row storage and column storage of database
- C#泛型方法
- Installing and using protobuf-c
- 软件项目验收测试范围和流程,这些你都知道吗?
猜你喜欢

MadCap Flare 2022,语言或格式的文档

Neuron+ekuiper realizes data collection, cleaning and anti control of industrial Internet of things

技术实践 | 场景导向的音视频通话体验优化
Redis+Caffeine两级缓存的实现

client-go gin的简单整合九-Create

Stm32f1 and stm32subeide programming example - Optical intermittent sensor drive

Cat agile team coaching workshops - August 20

Maui uses Masa blazor component library

Kubernetes monitoring: grafana adds datasource and dashboard through automation
![[cloud native] event publishing and subscription in Nacos -- observer mode](/img/0f/34ab42b7fb0085f58f36eb67b6f107.png)
[cloud native] event publishing and subscription in Nacos -- observer mode
随机推荐
JS高级程序设计第 4 版:迭代器的学习
Summary of patent blog writing
HW is around the corner. Can't you read the danger message?
Neuron+eKuiper 实现工业物联网数据采集、清理与反控
如何给VR全景作品添加遮罩?作用是什么?
“不敢去怀疑代码,又不得不怀疑代码”记一次网络请求超时分析
Opengauss database source code analysis series articles -- detailed explanation of dense equivalent query technology
JS advanced programming version 4: learning iterators
Cosmos、Polkadot
Chip silicon and streaming technology
Nine good programming habits for 10 years
Tianrun cloud is about to be listed: VC tycoon Tian Suning significantly reduces his holdings and is expected to cash out HK $260million
What is bout?
Istio服务网格中的流量复制
Interpretation of the thesis -- factorization meets the neighborhood: a multifaceted collaborative filtering model
Is polardbx PG or MySQL?
Temporary recommendation on graphs via long- and short term preference fusion
Detailed explanation of rules and ideas for advance sale of deposit
5G时代,如何打造一场令人惊叹的VR直播活动?
Maui uses Masa blazor component library