But what level institution are you at? I can easily imagine weak second and third tier CS students who can't code their way out of a paper bag. It looks like Reddit's r/cscareerquestions/ gets questions from a lot of these type of people.
The only way I think that would happen would be if they were fairly weak to begin with and had a ton of performance anxiety, but I'd expect that to be exceptionally rare.
You could maybe pass the intro to CS class (mostly theory, not much programming), but unless you were willing to pay someone else to take tests for you there is absolutely no way you'd make it through data structures, or algorithms.
Even in an intro to MATLAB class I took that was designed primarily for non CS majors (mostly physics and biology majors) that substandard level of programming would have resulted in an F.