Netcracker Technology interview question

c++ oops concepts, gdb debugging, predict the output