当前位置:网站首页>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]);
}
}
边栏推荐
- Shape template matching based on Halcon learning [vi] find_ mirror_ dies. Hdev routine
- Fundamentals of C language
- C # joint configuration with Halcon
- MHA High available Cluster for MySQL
- 【论文阅读】2022年最新迁移学习综述笔注(Transferability in Deep Learning: A Survey)
- Adaptive filter
- 亿学学堂给的证券账户安不安全?哪里可以开户
- Naming rules for FreeRTOS
- 1-stm32 operation environment construction
- Shape template matching based on Halcon learning [VII] reuse_ model. Hdev routine
猜你喜欢
C # joint configuration with Halcon
Makefile application
OC and OD gate circuit
DokuWiki deployment notes
MySQL之MHA高可用集群
Relationship between line voltage and phase voltage, line current and phase current
Consul安装
Carrier period, electrical speed, carrier period variation
Process communication mode between different hosts -- socket
Summary -st2.0 Hall angle estimation
随机推荐
Consul installation
C language # and #
C WinForm [help interface - send email] - practice five
STM32 tutorial triple ADC interleaved sampling
DokuWiki deployment notes
Communication standard -- communication protocol
Classic application of MOS transistor circuit design (1) -iic bidirectional level shift
UEFI development learning 3 - create UEFI program
Imx6ull bare metal development learning 2- use C language to light LED indicator
Shell脚本基本语法
MySQL MHA high availability cluster
C#,数值计算(Numerical Recipes in C#),线性代数方程的求解,LU分解(LU Decomposition)源程序
Detailed explanation of SQL server stored procedures
Basic embedded concepts
C WinForm [change the position of the form after running] - Practical Exercise 4
Network communication process
【云原生 | 从零开始学Kubernetes】三、Kubernetes集群管理工具kubectl
Measurement fitting based on Halcon learning [II] meaure_ pin. Hdev routine
C WinForm [realize the previous and next selection pictures] - practice 7
Class of color image processing based on Halcon learning_ ndim_ norm. hdev