Difficulty: Easy
Correct Answer: India
Explanation:
Introduction / Context:
Here we test printf behavior when the format string has no conversion specifiers and an extra argument is passed. Understanding varargs and format processing helps prevent misuse and vulnerabilities.
Given Data / Assumptions:
Concept / Approach:
printf processes its first argument as a format string. If there are no conversion specifiers, it simply writes the format text. Although supplying extra arguments is undefined by strict standards discussions, practical implementations will not consume them because no % directives appear.
Step-by-Step Solution:
Format string is "India".No % specifiers are present to consume subsequent arguments.printf therefore writes "India" to stdout.
Verification / Alternative check:
Compile and run; you see "India" (without a newline). Adding "%s" to the format, as in printf("%s", "CURIOUSTAB\n"), would print the passed string.
Why Other Options Are Wrong:
"India CURIOUSTAB" / "CURIOUSTAB": would require format placeholders.Error / No output: the code compiles and prints the literal.
Common Pitfalls:
Thinking printf automatically prints all subsequent arguments; forgetting to include a newline or appropriate format specifiers.
Final Answer:
India
Discussion & Comments