当前位置:网站首页>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]);
}
}
边栏推荐
- MySQL MHA high availability cluster
- 1-stm32 operation environment construction
- Buildroot system for making raspberry pie cm3
- Classic application of MOS transistor circuit design (2) - switch circuit design
- Void* C is a carrier for realizing polymorphism
- Embedded composition and route
- Live555 push RTSP audio and video stream summary (I) cross compilation
- C WinForm [exit application] - practice 3
- Matlab2018b problem solving when installing embedded coder support package for stmicroelectronic
- Weidongshan Internet of things learning lesson 1
猜你喜欢
MySQL之MHA高可用集群
Classic application of MOS transistor circuit design (1) -iic bidirectional level shift
How to copy formatted notepad++ text?
Introduction of air gap, etc
Halcon's practice based on shape template matching [2]
Why is 1900 not a leap year
Network communication model -- Network OSI tcp/ip layering
H264 (I) i/p/b frame gop/idr/ and other parameters
Several important parameters of LDO circuit design and type selection
Summary of SIM card circuit knowledge
随机推荐
Bluetooth hc-05 pairing process and precautions
WiFi wpa_ Detailed description of supplicant hostpad interface
[trio basic tutorial 17 from getting started to mastering] set up and connect the trio motion controller and input the activation code
Sql Server的存储过程详解
Wifi-802.11 negotiation rate table
Consul安装
How to define guid in AMI code
Introduction of air gap, etc
Detailed explanation of pragma usage
Programming knowledge -- basis of C language
【云原生 | 从零开始学Kubernetes】三、Kubernetes集群管理工具kubectl
Sizeof (function name) =?
Network communication model -- Network OSI tcp/ip layering
Basic embedded concepts
Imx6ull bare metal development learning 2- use C language to light LED indicator
C WinForm [display real-time time in the status bar] - practical exercise 1
Live555 RTSP audio and video streaming summary (II) modify RTSP server streaming URL address
Basic information commands and functions of kernel development
Reasons for rapid wear of conductive slip rings
What are the test items of power battery ul2580