Replace int in an array

I am working on some project with MEGA. The idea is when i have input on some pin to print on Serial monitor some character. Say, input is on pin 33 and i need to print letter C. It is a modification of some project so i don’t have much space so i don’t ruin the rest. This is the part of code where i am suck.

const int buttonPin[] = {31,33,35,37}; //pins on MEGA
int buttonState=0;

void setup(){
for(int x=0; x<4; x++){
pinMode(buttonPin[x], INPUT_PULLUP) 
}
}

void loop(){
for(int x=0; x<4; x++){
buttonState=digitalRead(buttonPin[x]);
if(buttonState==LOW){
Serial.println(buttonPin[x]);// the tricky part
}
}
}

I am not that good in C++ as i most of programming do in PHP, so i don’t know how to replace that pin numbers with letters. Say 31 with A and 33 with B. And i believe it should be inside void loop and right before Serial output.

Any help would be appreciate.

Serial.print ((char)(x + ‘A’));

That to put where?

The tricky part

That was awesome!!!
But, i would like to understand it, if you have time.
And if i want to replace pin 31 with number 1?
I do need solution, but knowledge is what i need the most.

If you meantconst int buttonPin[] = {1, something, something else, another value...,};then there's no change.

If you meant you want to see a '1', instead of 'A', then "Serial.print ((char)(x + '1'));"

Thank you.

who_took_my_nick:
That was awesome!!!
But, i would like to understand it,

Have a look at an ascii table and it should become clear.