Answer is (D).
In NPDA we may have a dead configuration. This mean we may not give any transition to any alphabet from this state.
We say that a string is accepted if PDA is in final state after reading the final symbol in the string or after it has read '$' symbol denoting end of the string and it is in final state.
Now coming to options:
Question never says that we have transitions defined for all the alphabet symbols in the PDA. Although it is ALREADY in the FINAL state we may not have ANY transition for any input symbol. In this case string will be rejected as it will never finish reading the string.
To sum up: A string is rejected in following two ways:
- If no transition is defined for any configuration(this includes the final state as well because to accept the string we need the transition $(f,\$,\_)\to (f,_)$ in final state or accepting state where blank $('\_')$ denotes arbitrary stack symbol that does not matter because we are not accepting by EMPTY stack
- If string enters a configuration for which no transition is defined, STRING is rejected.
So, option (D) is correct. Because the same way it may not empty the stack when it finishes reading the string.