Einfochips interview question

Basic questions on Digital electronics and C programming.