HCLTech interview question

Local and global variable in API, Array program