
Originally Posted by
Deveno
the picture is made of two characters. this is stored in a 2-dimensional array. it doesn't matter "what" the characters are (they could indeed be spaces, or control characters such as line breaks).
depending on how you instruct the array to be displayed, you might wind up with what looks like you have typed at the beginning, or something VERY different. this is not a feature of the array itself, but rather on a higher level of "interpretation" (which is language-specific).
there is nothing in your statement of the assignment that indicates spaces (empty characters) should be converted to line breaks (newline characters).
check again what the domain of definition of your transformations is. i believe the diagonal flip amounts to what is known as the "transpose", that is, replacing the array element (a,b) with (b,a). so, for example the array:
A A A A <--- 7 characters, 3 of which are " " (blank).
A A A A
A A A A
A A A A
A A A A
A A A A
A A A A
A A A A
A A A A would get transformed to:
AAAAAAAAA
<----this is a "blank row"
AAAAAAAAA
AAAAAAAAA
AAAAAAAAA (the "blank columns" have become "blank rows").
depending on how the programmming language parses spaces, these might not be displayed as above.