It is not that difficult to maintain a 9.8+ CGPA over the course of a semester, but it is pretty hard in the first semester; you actually need to score 10 points to reach the goal. In the following semesters, you can be among the top 10 with good interaction with teachers during the lectures and a good performance in the class tests. Do not mug up the concepts and theory; rather, try to have a deeper understanding of every topic. And last, but not least, it is important to stay away from distractions and reduce your leisure time.