Sort of. There are some things that a person entering a field is expected to know without needing to look them up, because if you don't know it you won't develop good intuition or be able to execute your work in a timely manner. Most of the stuff you learn in your freshman year is this type of thing, while the later years tend to have more open-book tests.
This is also the kind of thing that you check for in an interview - somebody who needs to look up how to write a for loop isn't going to get hired as a C programmer, and somebody who isn't familiar with Ohm's law will flunk their electronics interview. So there's a very pragmatic reason to make sure that students have the basics memorized.