Find the output:

2025

Find the output:

  1. A.

    9,9

  2. B.

    9,10

  3. C.

    10,9

  4. D.

    10,10

Attempted by 86 students.

Show answer & explanation

Correct answer: B

Step 1: The string "Accenture" has 9 characters.

Step 2: strlen(name) returns the number of characters in the string, which is 9.

Step 3: sizeof(name) returns the total size of the array, including the null terminator '\0'. The array has 10 bytes (9 characters + 1 null byte).

Step 4: The printf statement prints %d,%d, so the output is 9,10.

Explore the full course: Accenture Preparation