Question PSC-ARR-0021
EasyWhat will be printed by the following pseudocode?
Integer a[] = {5, 2, 8, 1}
Print a[0] + a[3]
- A.
6
- B.
3
- C.
Show answer and explanation
Answer: A
a[0] is 5 and a[3] is 1 (indices start at 0).
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Arrays question
What will be printed by the following pseudocode?
Integer a[] = {5, 2, 8, 1}
Print a[0] + a[3]
6
3
Answer: A
a[0] is 5 and a[3] is 1 (indices start at 0).
10
13