What is the output of the following code snippet? int arr[] = {1, 2, 3, 4, 5};…

PYQ Hexaware Hiring Assessment 2024

What is the output of the following code snippet?

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

printf("%d", arr[5]);

  1. A.

    1

  2. B.

    5

  3. C.

    Undefined behaviour

  4. D.

    0

Attempted by 1576 students.

Sign up free to check your answer

Sign up free

Explore the full course: Cdac C Cat Complete Preparation

Loading lesson…