The response itself, which seems to not answer the question literally, is called an:
In your instances, a yes/no question is asked, but the response doesn't say yes or no directly but instead says something which allows the asker to infer the answer, indirectly.
In general, an exchange like this, where context would allow one to infer the answer or the next, the inference is a kind of:
This is in contrast to an entailment (or logical inference that is possible without context). These are a technical terms coined by Grice (of Grice's maxims) in the field of pragmatics.