Green’s Dictionary of Slang

what the devil...? phr.

also what a devil…? what in the devil...?
[devil, the phr.]

[mid-14C+] a general interrogatory intensifier; a var. on what the hell...? phr.