The following piece of code is written in C++.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The array is of size 6 and we're trying to print up to 30 values and because memory locations beyond the scope of the array will either be empty or used for some other process and hence we'll have both zeroes and garbage values as part of our output.