Solution:
Both the compounds carbon atom is attached to the electronegative atom oxygen. Thus the oxygen pulls more shared pair of electron towards them and a partial positive charge will be acquired by carbon and a partial negative charge by oxygen. So carbonyl atom is attacked by a nucleophile.