NTT DATA interview question

Regarding a API fetching program