What will be the output of the following pseudocode?
Note: positions in s start from 0
String s = "DECIDED"
Integer i, c
Set c = 0
for (each i from 0 to 3)
if (s[i] == s[6 - i])
c = c + 1
End if
End for
Print c2
5
3
1
The verified answer and full solution are one login away
Every answer here is machine verified, with a step-by-step solution that teaches the method. Your login also unlocks a 7-question mock preview in the real exam interface.
Log in to see the answer