Daffodil Software interview question

Basic array, linked list questions from GeeksForGeeks and puzzles from it.