当前位置:网站首页>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]);
}
}
边栏推荐
- UEFI development learning 3 - create UEFI program
- Soem EtherCAT source code analysis I (data type definition)
- My-basic application 1: introduction to my-basic parser
- UEFI development learning 4 - getting to know variable services
- C # joint configuration with Halcon
- Explication de la procédure stockée pour SQL Server
- NTC thermistor application - temperature measurement
- Create inf module in AMI code
- Shell script realizes the reading of serial port and the parsing of message
- Slist of linked list
猜你喜欢
Programming knowledge -- basis of C language
Design a clock frequency division circuit that can be switched arbitrarily
On boost circuit
Shape template matching based on Halcon learning [viii] PM_ multiple_ models. Hdev routine
C language enhancement -- pointer
Measurement fitting based on Halcon learning [III] PM_ measure_ board. Hdev routine
UEFI development learning 2 - running ovmf in QEMU
FIO测试硬盘性能参数和实例详细总结(附源码)
Create inf module in AMI code
1-stm32 operation environment construction
随机推荐
C WinForm [help interface - send email] - practice five
Live555 RTSP audio and video streaming summary (II) modify RTSP server streaming URL address
Hardware 1 -- relationship between gain and magnification
Introduction of air gap, etc
Network port usage
Explain task scheduling based on Cortex-M3 in detail (Part 2)
Measurement fitting based on Halcon learning [II] meaure_ pin. Hdev routine
亿学学堂给的证券账户安不安全?哪里可以开户
Interview catalogue
Step motor generates S-curve upper computer
Bootloader implementation of PIC MCU
UEFI development learning 5 - simple use of protocol
Charge pump boost principle - this article will give you a simple understanding
Shell script realizes the reading of serial port and the parsing of message
[trio basic tutorial 18 from introduction to proficiency] trio motion controller UDP fast exchange data communication
Baiwen 7-day smart home learning experience of Internet of things
Halcon's practice based on shape template matching [2]
Vofa+ software usage record
Compilation warning solution sorting in Quartus II
Google sitemap files for rails Projects - Google sitemap files for rails projects