Difficulty: Easy
Correct Answer: None of above
Explanation:
Introduction / Context:
This mirrors an earlier pattern: adding an integer to the pointer that results from a string literal moves the starting point for printing. Here, we must compute which substring begins at offset 5 of 'CuriousTab\n' and recognize which option matches the visible output.
Given Data / Assumptions:
Concept / Approach:
printf treats the passed pointer as a format string. Since 'usTab\n' contains no % directives, it prints as ordinary text. The visible output (ignoring the line break) is 'usTab'. None of the listed literal options exactly spell 'usTab', so the correct choice is the generic 'None of above'.
Step-by-Step Solution:
Verification / Alternative check:
Changing the offset to 7 would print 'Tab\n'. To print the full word 'CuriousTab', use offset 0.
Why Other Options Are Wrong:
Common Pitfalls:
Off-by-one counting when indexing strings; assuming printf requires a % format when given a string literal as its only argument.
Final Answer:
None of above.
Discussion & Comments