Good answer, BC. The rules given by you are something of an idealised view of what must be done. You sometimes ask a question when you don't know what the answer will be, but you do know that the answer either won't harm you or it will come across as so absurd , though apparently adverse on the face of it, that you can easily cross-examine further and demonstrate that the witness is not to be believed in that, and, by extension, anything else.
Such questions can be very valuable. Witnesses are on the alert for lines of questioning. By asking such questions you often discover a new and surprising line of enquiry; the witness volunteers something in all innocence and the jury gets a picture, with other evidence or not, which is favourable to you.
But everyone is told , when defending, to avoid asking grizzled old sergeants "Why did you suspect the defendant ?" !