Mr. Obama is the 45th president of the USA. How do we frame a question so as to get 45th as the answer?
I know this probably isn't a word, but it should be. It sounds better than calling him an ordinal president.
(By the way, we get this question every month. There's no right answer).
Most people would use a circumlocution like, "You know how Washington was the first president? What number is Obama?"
I was assuming the OP meant what question you could ask in real life to get that answer. I agree that asking about this is fraught with dangers and the very real possibility that the questioner would have to add the 'th' themselves.
But that's not a deficiency of my question, which illustrates for the questionee what is meant. 'Ordinal' is not used in the question: 'first' is offered as a template.