Neebal Technologies interview question

In Programming two programs are given, OOPS concepts