2D character array

Can any one just give me some problems , which could be solve by the help of 2d character arrays. I want them so that I can prepare myself for exams.
There is some fun uses and practical uses for 2D char arrays. A fun use is making a map for a simple game. A practical use is the char array of pointers style, where it hold's a list of sentences, often used for an args list.
1.) *(someArray + i) is the same as someArray[i]. Instead of (someArray + i) it's also possible to write (i + someArray), the result is the same. So, is i[someArray] equivalent to someArray[i]?

2.) Write a method void init(const T&) to initialize all elements of a 2D-matrix with random values in the range [1, 20].

3.) Write a program to multiply two matrices a[n][m] * b[p][q]. The result is to be stored in a third matrix, c[r][s].


Here are some further, straightforward exercises: http://chortle.ccsu.edu/java5/Notes/chap49C/progExercises49C.html (It's Java, but should work as fine in C++).
Last edited on
THANK YOU
It helped alot...
Topic archived. No new replies allowed.