AUTHOR=Zhang Feifan , Peng Zhenwan , Wang Changqing , Yang Fei TITLE=Design and application of teaching cases based on heuristic teaching in C programming language curriculums—taking the loop structure for an example JOURNAL=Frontiers in Education VOLUME=Volume 10 - 2025 YEAR=2025 URL=https://www.frontiersin.org/journals/education/articles/10.3389/feduc.2025.1498100 DOI=10.3389/feduc.2025.1498100 ISSN=2504-284X ABSTRACT=C programming is a general-purpose, processor-oriented, and powerful language, widely used in various daily life applications. As a prerequisite for many core courses in computer science and information technology such as data structures, it serves as a fundamental course for multiple majors in universities globally. However, it remains one of the most challenging subjects to learn and master, with consistently high failure rates being a global problem. To improve learning efficiency and develop problem-solving skills through programming, we implemented a heuristic teaching method incorporating specially designed case studies. The participants were freshmen majoring in Medical Information Engineering at Anhui Medical University. Taking the loop structure as an example, we explain the design of case studies to engage students. The average scores improved from 72.9 to 77.2 between semesters without and with the heuristic teaching approach. Independent T-test results confirmed the statistical significance of this improvement. Student evaluations of teaching performance increased from 90.73 to 94.53. These results demonstrate the effectiveness of this heuristic teaching method with specially designed cases. We think that the proposed method may be also suitable for other programming courses.