DXC Technology interview question

Basics core programming at freshers level