Report Bug

QusSuppose a list with name arr, contains 5 elements, You can get the 2nd element from the list using? Qusमान लीजिए कि arr नामक सूची में पाँच एलीमेंट्स हैं । आप सूची से दूसरा एलीमेंट.... के उपयोग से प्राप्त कर सकते है ?


A. arr[-2]
B. arr[2]
C. arr[-1]
D. arr[1]


Solution
D. arr[1]



Explanation

All Array and List index  start with 0 (zero) so the second element of array or list refer by index 1 (one) so to access the second element correct statement is arr[1].

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz