Correct Answer - Option 2 : 23
The logic followed is:
Code = Sum of the digits of the number + 3
For 782,
Code = Sum of the digits of the number + 3
= 7 + 8 + 2 + 3
= 20
For 671,
Code = Sum of the digits of the number + 3
= 6 + 7 + 1 + 3
= 17
Similarly, for 884,
Code = Sum of the digits of the number + 3
= 8 + 8 + 4 + 3
= 23
So, the code for 884 is 23.
Hence, the correct answer is "23".