engineering computer science MCQ #2126

What is the output of `int arr[5] = 1, 2; printf('%d', arr[3]);`?

engineering computer science MCQ #2126

  1. Question 1

    Q1. What is the output of `int arr[5] = 1, 2; printf('%d', arr[3]);`?

    • A) 0
    • B) Garbage Value
    • C) 2
    • D) Compilation Error

    Answer: Garbage Value

    Explanation: Uninitialized elements in an array contain garbage values. NET computer science MCQs often test this core concept.