iLink Digital interview question

Questions were about API,multithreading and choose the missing code which complete the program