Practice Accessing Elements - 1.4 | Chapter 10: Arrays and Strings | ICSE Class 12 Computer Science
K12 Students

Academics

AI-Powered learning for Grades 8–12, aligned with major Indian and international curricula.

Professionals

Professional Courses

Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.

Games

Interactive Games

Fun, engaging games to boost memory, math fluency, typing speed, and English skills—perfect for learners of all ages.

Practice Questions

Test your understanding with targeted questions related to the topic.

Question 1

Easy

What is the output of cout << marks[1]; if marks is initialized as int marks[5] = {90, 85, 78, 92, 88};?

💡 Hint: Remember, indexing starts at 0.

Question 2

Easy

How would you access the second element in an array called data?

💡 Hint: Consider the zero-indexing rule.

Practice 4 more questions and get performance evaluation

Interactive Quizzes

Engage in quick quizzes to reinforce what you've learned and check your comprehension.

Question 1

What is the correct way to access the first element of an array named 'scores'?

  • scores[0]
  • scores[1]
  • scores[2]

💡 Hint: Remember the indexing starts at 0.

Question 2

True or False: You can access a two-dimensional array's elements using one index only.

  • True
  • False

💡 Hint: Think about how the dimensions relate to accessing elements.

Solve and get performance evaluation

Challenge Problems

Push your limits with challenges.

Question 1

Write a program that initializes a 3x3 matrix with random values and prints out each value in a well-formatted manner. Explain how elements are accessed.

💡 Hint: Consider how you can apply nested loops for both rows and columns.

Question 2

Given a one-dimensional array that represents temperatures for a week, write a function that finds the highest temperature. Explain your method of accessing each element.

💡 Hint: Think about how you can retain the maximum value as you loop.

Challenge and get performance evaluation