HCLTech Interview Question

Asked me to write some C programs with desired output