Infosys Interview Question

Explain stack, queue, graph. Explain output for following Cpp code.