Putting a sentence into a 2D array

I want to input a sentence in exactly 5 words. The sentence splits into strings. These strings will be stored in a 2D array.
For example,
Input: There is a red apple
Array[5][10] <= each word has at most 10 characters

T h e r e
i s
r e d
a p p l e

if I cout << Array[3][2], the display would be 'e'.

I can only use 2D array and can`t use pointer.
Topic archived. No new replies allowed.