51% attack on New coins
Why would the attacker target new cryptocurrencies?


Why not? He has the same reasons as you to create blocks


  What changes in the code i have to implement to prevent the 51% attack?


Disable decentralization. Allow mining from one pubkey/address only :)