c langauge array

Solutions on MaxInterview for c langauge array by the best coders in the world

showing results for - "c langauge array"
Flavio
07 Jan 2021
1// Syntax: 
2datatype_variable[dimension] = new datatype[size]{array};
3
4// For example:
5string MyArray[] = new string[1]{"Hello","World"};
6
7// or just:
8string MyArray[]={"Hello","world"};
9
10// for multidimensions:
11// 2D array:
12         	  // 2 arrays, 3 values //
13int MyArray=[,]=new int[1,2]{
14  {1,2,3},
15  {1,2,3}
16}
17
18// 3D array:
19              // 2 arrays, 3 arrays, 4 values //
20int MyArray=[,,]=new int[1,2,3]{
21  {
22    {1,2,3,4},
23    {1,2,3,4},
24    {1,2,3,4}
25  },
26  {
27    {1,2,3,4},
28    {1,2,3,4},
29    {1,2,3,4}
30  }
31}
Frida
09 Nov 2017
1type arrayName [ arraySize ] = { elements };
similar questions
queries leading to this page
c langauge array