Spock probably presumed Khan might have hacked Reliant's computer systems and consequently learned about the prefix code, whereas Saavik wouldn't be doing such things.
And hacking into a starship's main computer would require intelligence.
Yes, and sometimes intelligence manifests as simply being aware enough to bother looking something up. Khan's smart enough to do that, if he hadn't been overconfident.
Whether Khan looked up the code says nothing about what it would have taken to change the code.