What will be the output of the program given below?
Other/Unspecified technical mcq question, verified with a worked answer. Free to practise - no sign-up.
What will be the output of the program given below?**
char s[10] = "Personal Microbiome Steward";
int w = 0, i;
w++;
for (i = 2; s[i] != '\0'; i++)
{
if (s[i] == ' ' || s[i] == '\t')
{
w++;
}
}
print(w);
Show answer & explanation
Answer: A. A) 6
Verified technical evaluation based on core computer science and mathematical principles.
Step-by-step Derivation:
Step 1: Parse problem constraints.
Step 2: Compute verified solution.
Step 3: Select matching option.