I have asked many questions regarding the usage of 'any'. Now I know in questions we use 'any' with plural nouns. Or we use indefinite article 'a/an'. But no grammar book says that 'any' with singular nouns is wrong. It says that it is relatively uncommon. Thus we prefer to say:
1- Do you have a book?
2- Do you have any books?
But can you explain a situation where I can use any with "singular nouns" in a question? Can I ever say "Do you have any pen?" In the grammar book "The Cambridge grammar of the English language" there are a few examples where 'any' is used with singular nouns in negative sentences. But in case of questions, I did not get any examples. I have attached images of the pages of the grammar book.