serial input

void loop(){
int a =Serial.parseInt();
Serial.println(a);
}
in the above code without an input it has taken the value as 0 and displayong

You are not checking whether there is any serial input to read.
Try this

void loop() 
{
  if (Serial.available())
  {
    int a = Serial.parseInt();
    Serial.println(a);
  }
}

Set the line ending in the Serial monitor to 'No line ending' to avoid complications with linefeed/carriage return

thanks pal,it worked