Stores the character representation of 65 (which is an 'A') into the variable a. There are multiple ways to cast data types. Google it. There is lot's of tutorials there.
As for the code, you'll want to typecast the output as char, like this cout<< (char) x[r][c] << " ";
You'll also want to replace the rand() % 100;
with rand() % 25+65
im still kind of confused. isnt there a way where i have to program generate random letters. like right im getting random numbers generated between 1 and 100.
char A[N][M];
for (int r = 0; r<N; r++)
for (int c = 0; c<M; c++)
A[r][c] = rand() % ('z' - 'a' + 1) + 'a';
The expression ('z' - 'a' + 1) evaluates to 26, which is the number of letters in the alphabet. I wrote it that way to show how to use it in other cases. Say you wanted to generate letters from 'M' to 'P', you could write rand() % ('P' - 'M' + 1) + 'M';