It gets better! After a few interviews you start to get the hang of things and can begin to read the situation and understand what's in your best interest to do. Some interviewers like to test your knowledge of C.S. curriculum like you just mentioned, others prefer a friendly person who isn't afraid to ask questions and be honest about what you can and cannot do, others prefer both.
I definitely will be far more prepared for my next programming interview from the experience I gained going through the process once already. It's just sad that my first interview process had to be with a higher-profile company that would have been a ticket into silicon valley. Those interviews don't come easy in the first place. Haven't heard back from anyone else yet, but I trust they'll come along.
You'll look back at it in a year or so and laugh. Personally my resume and interviews were absolutely atrocious (I thought an online resume builder was a good idea..).
It gets better.