Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

c array initialization

int x[] = {1,2,3}; // x has type int[3] and holds 1,2,3
int y[5] = {1,2,3}; // y has type int[5] and holds 1,2,3,0,0
int z[3] = {0}; // z has type int[3] and holds all zeroes
Source by en.cppreference.com #
 
PREVIOUS NEXT
Tagged: #array #initialization
ADD COMMENT
Topic
Name
7+7 =