Look on the left side of the engine just under the head on the front of the block itself. You should see a series of numbers stamped (not cast) into the block.
It will show 340 somewhere in the stamping if it's a 340.
You may need to scrape away some paint/grease etc to see it.