It is called an echo question. There are different types of echo questions and they don't always follow your examples.
"We use echo questions either because we did not fully hear or understand what was said, or because its content is too surprising to be believed. For example:
(It cost £5,000.) HOW much did it cost?
(His son's an osteopath.) His son's a WHAT?
Echo questions are usually spoken with a rising intonation, and with a strong emphasis on the wh-word (what, who, how and so on)."
(Geoffrey Leech, A Glossary of Grammar Terms. Edinburgh Univ. Press, 2006)
Here is a pdf document with a detailed explanation of echo questions:
Metalinguistic Semantics for Echo Questions - MIT (by Yasutada Sudo)