Pergunta de entrevista da empresa Avaya

their were 2 c++ programs to predict the o/p.