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

PYQ CoCubes 2024

What is the output of the following C code snippet?

int arr[] = {1, 2, 3, 4, 5};
printf("%d", arr[5]);
  1. A.

    1

  2. B.

    5

  3. C.

    Undefined behavior

  4. D.

    0

Attempted by 1508 students.

Sign up free to check your answer

Sign up free

Explore the full course: Cdac C Cat Complete Preparation

Loading lesson…