当前位置:网站首页>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]);
}
}

边栏推荐
- Sizeof (function name) =?
- Connection mode - bridge and net
- Sql Server的存儲過程詳解
- How to select conductive slip ring
- Relationship between line voltage and phase voltage, line current and phase current
- Shell script basic syntax
- OC and OD gate circuit
- Live555 push RTSP audio and video stream summary (III) flower screen problem caused by pushing H264 real-time stream
- [paper reading] the latest transfer ability in deep learning: a survey in 2022
- [tutorial 19 of trio basic from introduction to proficiency] detailed introduction of trio as a slave station connecting to the third-party bus (anybus PROFIBUS DP...)
猜你喜欢

Semiconductor devices (III) FET

Arduino uses nrf24l01+ communication

Nb-iot technical summary

UEFI development learning 6 - creation of protocol

Consul安装

MHA High available Cluster for MySQL
![[cloud native | learn kubernetes from scratch] III. kubernetes cluster management tool kubectl](/img/8a/702019b44c8e60dffbcd898330afcb.png)
[cloud native | learn kubernetes from scratch] III. kubernetes cluster management tool kubectl

Communication standard -- communication protocol
![Shape template matching based on Halcon learning [viii] PM_ multiple_ models. Hdev routine](/img/13/22a1915329f58acd54c40176f6f301.jpg)
Shape template matching based on Halcon learning [viii] PM_ multiple_ models. Hdev routine

QEMU STM32 vscode debugging environment configuration
随机推荐
[tutorial 19 of trio basic from introduction to proficiency] detailed introduction of trio as a slave station connecting to the third-party bus (anybus PROFIBUS DP...)
UEFI development learning 4 - getting to know variable services
Connection mode - bridge and net
My-basic application 2: my-basic installation and operation
[trio basic from introduction to mastery tutorial 20] trio calculates the arc center and radius through three points of spatial arc
[trio basic tutorial 18 from introduction to proficiency] trio motion controller UDP fast exchange data communication
OLED 0.96 inch test
Sql Server的存儲過程詳解
C WinForm [get file path -- traverse folder pictures] - practical exercise 6
Sizeof (function name) =?
WiFi wpa_ Detailed description of supplicant hostpad interface
[trio basic from introduction to mastery tutorial XIV] trio realizes unit axis multi-color code capture
Halcon's practice based on shape template matching [1]
Development tools -- gcc compiler usage
UEFI development learning 2 - running ovmf in QEMU
Communication standard -- communication protocol
Hardware 1 -- relationship between gain and magnification
Google sitemap files for rails Projects - Google sitemap files for rails projects
Explication de la procédure stockée pour SQL Server
MHA High available Cluster for MySQL