engineering computer science MCQ #2129

What is the output of `printf('%lu', sizeof('Hello'));`?

engineering computer science MCQ #2129

  1. Question 1

    Q1. What is the output of `printf('%lu', sizeof('Hello'));`?

    • A) 5
    • B) 6
    • C) sizeof(char)
    • D) Compilation Error

    Answer: 6

    Explanation: String literal 'Hello' includes a null terminator, making its size 6 bytes.