ABC interview question

Basic questions related to logical thinking