w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Use of pointers in multi dimensional arrays in C

The array is 0-indexed, so 2 and 5 are the spots before each sub-array starts, so it puts a line break before outputting them.

    {{1,2,3} , {4,5,6} , {7,8,9}};
 i=0--^   ^--i=2    ^--i=5

output looks something like this:

Elements of an array with their address

Notice each dimension of the array has its own line.

(Memory addresses may vary)

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.