Does a guy still have feelings for his ex if he asks her friend how she is doing?

More than likely. Because if he did not have feelings for her anymore then he would not be asking about her.