(See here) From the accepted answer in that post, you can see in C it would evaluate as:
((rand() % 2 == 0) ? map[x][y] = 'm' : map[x][y]) = 'M';
And the statement on the left is not a proper L-value. You could rewrite this as:
map[x][y] = rand() % 2 == 0 ? 'm' : 'M';
rand() % 2 == 0 ? (map[x][y] = 'm') : (map[x][y] = 'M'); // This should work in C, but I do not have gcc handy to verify