Selling a car but wanting to keep the engine

Your car so you can sell it anyway you want.
But if it was me, I would write the ad stating the car exactly as you're selling it - listing the 318 and not even mentioning the 340 that you pulled out of it. You'd be telling the truth, the whole truth and exactly what is being sold.
Oh yeah, pull the 340 and install the 318 before you put the car up for sale.