Which of the following will correctly initialize an array of 3 integers?

PYQ Hexaware Hiring Assessment 2023PYQ CoCubes 2025

Which of the following will correctly initialize an array of 3 integers?

  1. A.

    int arr[3] = {1, 2};

  2. B.

    int arr[2] = {1, 2, 3};

  3. C.

    int arr[3] = {1, 2, 3};

  4. D.

    int arr[4] = {1, 2};

Attempted by 1553 students.

Sign up free to check your answer

Sign up free

Explore the full course: Cdac C Cat Complete Preparation

Loading lesson…