You may store the charachters in an array, e.g.
const char col[]={'R','Y','G','B'};
then use the
rand
function to select the index of the character:
int r = rand() % sizeof(col);
For instance:
int i;
for (i=0; i<4; i++)
{
int r = rand() % sizeof(col);
printf("%c ", col[r]);
}
printf("\n");
:)