After the development of the Teaching model and optimizing it for minimizing the learning efforts and for enhancing the apprehension level of the students, it is found that it can be further extended for better teaching quality. If the e-learning tool has the capacity to identify the category of the student as well as the capability to automatically adjust the learning curve according to the level of and category of the student then the process of teaching-learning can be greatly enhanced and optimized. This paper presents the generalized technique of developing the student model and automatic selection of teaching mode for a particular course for optimizing the teaching-learning process. The technique developed here has been applied to the CBT software for C language. It is found that trough this innovative technique the apprehension level of students can be substantially enhanced, the time efficiency has dramatically increased and quick delivery of only essential and required knowledge is possible.