Programming Languages
C
Subjective
Mar 15, 2013
If you want to print the contents of an entire array. How would you do that?
Detailed Explanation
Step 1: Get the size of the array using the scalar context on the array. Eg. @array = (1,2,3);
print ; "Size: ",scalar @array,"\n";
Step 2: Iterate through the array using a for loop and print each item.
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts