diff options
author | Levi Bostian <levi.bostian@gmail.com> | 2013-11-24 23:26:11 -0600 |
---|---|---|
committer | Levi Bostian <levi.bostian@gmail.com> | 2013-11-24 23:26:11 -0600 |
commit | 67a5236629b6c7748b609f23c0362925b5c4774d (patch) | |
tree | 3b04c75247a895627a04b2164b66596fccc57a38 /c.html.markdown | |
parent | 5c7f6d70b9477fcd4fe64460704d7dcf48799f98 (diff) |
Add multi-dimensional array description.
Diffstat (limited to 'c.html.markdown')
-rw-r--r-- | c.html.markdown | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/c.html.markdown b/c.html.markdown index d029a00f..f4edfca5 100644 --- a/c.html.markdown +++ b/c.html.markdown @@ -148,6 +148,14 @@ int main() { int cha = 'a'; // fine char chb = 'a'; // fine too (implicit conversion from int to char) + //Multi-dimensional arrays: + int multi_array[2][5] = { + {1, 2, 3, 4, 5}, + {6, 7, 8, 9, 0} + } + //access elements: + int array_int = multi_array[0][2]; //=> 3 + /////////////////////////////////////// // Operators /////////////////////////////////////// |