sending values through serial monitor

I have been learning to send values to the arduino through the serial monitor. the code is below

int i = 0;
void setup()
{
  Serial.begin(9600);
}

void loop() {
  if (Serial.available())
  {
    i = Serial.read();
    Serial.print( i);
  }

}

when i send 1 to the monitor it prints 49 which is the ascii value of 1. but i want to only print 1. not its ascii value. what should be done?

 Serial.print((char) i);

Does declaring
char i;
beforehand have the same effect?

Yes, but strictly speaking, Serial.read returns an "int"

Have a look at the examples in Serial Input Basics - simple reliable ways to receive data. There is also a parse example.

...R