You need to focus on content and start learning to ask productive questions to help you become really interested in the content you are learning about, rather than treating it like some quiz you just study for. Be honest with yourself and with the interviewers. You don't need to prove your competence to yourself or overstress about looking competent to your interviewers, care about the content and they'll be able to see that you are good
I was asked to balance a binary tree on a whiteboard!
I walked out of there instantly, but generally all the interviews I went to had very similar questions.
I agree that it's rare that we have to write low-level functionality like this any more (I have had to write such things, however). I argue that basic CS knowledge isn't useless and actually does matter in the long run.