In most colleges in India, the instructor writes code on the blackboard (entire programs) that the students blindly copy into their notebooks. Then, they memorize these programs before the exam and reproduce them verbatim.
The sad part is students who really learn programming end up being penalized because their solution in the exam will differ from what was originally written on the blackboard (most faculty members are incompetent and therefore have no way of knowing whether a student's answer is correct or not unless it matches that supplied in some sort of an answer key).
The linked document is a scanned notebook from a student in one of the (supposedly) best colleges in South India. One look at that document will tell you volumes about what is wrong with CS education in India.