Would you hire an engineer who couldn't write a FizzBuzz without looking it up?
Yes?
I mean, even after 20 years of writing code professionally, I still don't remember the exact syntax for main methods for each language. Is it public static void main(String args[]) {} for Java, or is it something else? Will I remember that even when I've mostly been coding in Golang this week? Probably not.
I don't remember any of this. I don't remember that it's int main(int argc, char *argv[]); in C, or fn main() -> Result<(), Box<dyn ::std::error::Error> {} in Rust, or package main \n func main() {} in Go; I derive it anew each time based on my understanding of the language.
And I wouldn't hire me to write C code, because I can't remember where the `const`s go. All I remember is that you shouldn't really use them here, because you're expected to be able to modify argv (and sometimes you have to, e.g. to redact passwords that somebody foolishly provided on the command line). And I remember that #include <stdio.h> lets you use size_t, but don't ask me why.
Then again, I guess I'm proving your point. I could write fizzbuzz easily in C – perhaps more easily than in any language I'm good at – but that doesn't make me a good person to hire if you want a C programmer.
(If the issue is one of time sensitivity then the test should have an aggressive time limit)
Like, if there was a question that was easy to answer if you could look at a reference sheet, then why is it important to memorize it? If the test take could understand the question enough to know where to look it up, isn't that good enough?