Netcracker Technology Interview Question

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