Robin2:
Powering the HC-SR04 from the Arduino 5v pin is probably OK, but not the servo.If (as @Wawa has suggested) you use a 5v regulator to power the Arduino then you could also use that to power the Servo and the HCSR04. If it is a small servo the 500mA should be sufficient.
...R
i have posted my servo.. can u plss suggest what should i do to control it.. why cant i use the 5v pin of arduino to control it?