They ask common questions as a proxy for experience in those fields. If you work with something daily, you will end up memorizing certain facts even if you don't consciously try to. It follows, then, that if you don't have those facts memorized, you haven't been working with that technology daily.
I stopped memorizing syntax a long time ago. It's been a few years and an the only thing I can recall about C's pointer syntax is ^ and & but the specifics are long gone. Not that long ago I had to look up the conditional shorthand (expression)? true: false in java etc. I have used around 12 different languages and I try and forget the stuff I am not using or I will mix and match syntax that does not work for the language I am programming in.
PS: I was classified with a learning disability back in school so this could just be me.
Don't interview for positions in languages you've forgotten, then, or brush up and re-learn stuff before the interview. It's like riding a bike...it comes back to you.
Not being able to remember pointer syntax is a serious problem if you're being hired to program in C. I can understand why they'd want to weed out anyone who can't get that, particularly given how many candidates they have.
lol, thanks. I could have said x[i] is the same as ^(x + i) and really thought that was the correct syntax. The problem is I have used enough languages and dialects that I really can't brush up on it all. I just say if it's been five years, let me break out my cheet sheet for that stuff.
PS: Ok, if it was really just a C job of course I would focus on that.
Edit: Dammit it is like riding a bike. I have been having C flashbacks to horrible old code. O Malloc how do I hate the let me count the ways.
My solution to this problem was to make up sets of editor macros for the various languages I've used, with the same key chords producing the same semantics in varying syntax.
Around 5 years ago I was spent a lot of time working with really old Object Pascal and some C code that was upgraded to OS 8/9 and then left to rot. Let me just say that low level networking code on a OS that does not have threads is a PITA. They had something like interrupts but you could not allocate memory during them. You had to first allocate using Handel's and then do something before working with actual pointers as part of your run loop and then use that memory during the interrupts. Meh, I think it might have been the most fun coding project I have ever been on, but I don't want to do that again.