arduino gps help

Whenever i connect my arduino to a 5v TTL gps receiver and use the following code

The obvious things to check are that the GPS is indeed a TTL device and the baud rate. We can't help you there, since we have no idea which GPS you are using.

Another possibility is that the device uses inverted logic. There is an optional third argument for the NewSoftSerial constructor that allows it to handle inverted logic.