当前位置:网站首页>Array integration initialization (C language)
Array integration initialization (C language)
2022-07-05 08:15:00 【chen_ bx】
1. Initialize to 0 The size is 13 Array of
#include <stdio.h>
int main()
{
int i;
int a[13] = {
0 };
for (i = 0; i < 13; i++) {
printf("%d\t", a[i]);
}
}

2. The size is 13 Array of , Initializing page 6 The number is 6 And the 9 First paragraph 10 The number is 9 and 10, The other numbers are 0
Applicable to a large number of 0, Initialization of arrays with only a few values
#include <stdio.h>
int main()
{
int i;
int a[13] = {
[5]=6,[8]=9,10 };
for (i = 0; i < 13; i++) {
printf("%d\t", a[i]);
}
}

边栏推荐
- H264 (I) i/p/b frame gop/idr/ and other parameters
- Summary -st2.0 Hall angle estimation
- What are the test items of power battery ul2580
- Shape template matching based on Halcon learning [VII] reuse_ model. Hdev routine
- Semiconductor devices (III) FET
- C WinForm [get file path -- traverse folder pictures] - practical exercise 6
- Shape template matching based on Halcon learning [v] find_ cocoa_ packages_ max_ deformation. Hdev routine
- MySQL之MHA高可用集群
- Step motor generates S-curve upper computer
- Programming knowledge -- assembly knowledge
猜你喜欢

Hardware and software solution of FPGA key chattering elimination

【论文阅读】2022年最新迁移学习综述笔注(Transferability in Deep Learning: A Survey)

PMSM dead time compensation

NTC thermistor application - temperature measurement
![Shape template matching based on Halcon learning [vi] find_ mirror_ dies. Hdev routine](/img/99/21c228ff5de46c4a42b60f989b10e8.jpg)
Shape template matching based on Halcon learning [vi] find_ mirror_ dies. Hdev routine

MySQL之MHA高可用集群
![[paper reading] the latest transfer ability in deep learning: a survey in 2022](/img/6b/b564fb7a6895329073fb5eaff64340.png)
[paper reading] the latest transfer ability in deep learning: a survey in 2022

The firmware of the connected j-link does not support the following memory access

Simple design description of MIC circuit of ECM mobile phone

Introduction of air gap, etc
随机推荐
Synchronization of QT multithreading
Live555 RTSP audio and video streaming summary (II) modify RTSP server streaming URL address
Baiwen 7-day smart home learning experience of Internet of things
Screen record of the opening ceremony of the Beijing winter olympics 2
Detailed explanation of SQL server stored procedures
Network port usage
Reasons for rapid wear of conductive slip rings
[tutorial 15 of trio basic from introduction to proficiency] trio free serial communication
[cloud native | learn kubernetes from scratch] III. kubernetes cluster management tool kubectl
General makefile (I) single C language compilation template
Embedded composition and route
Basic embedded concepts
Network communication process
Management and use of DokuWiki (supplementary)
Charge pump boost principle - this article will give you a simple understanding
H264 (I) i/p/b frame gop/idr/ and other parameters
VESC Benjamin test motor parameters
Keil use details -- magic wand
Imx6ull bare metal development learning 1-assembly lit LED
Class of color image processing based on Halcon learning_ ndim_ norm. hdev