Contribution: This research study deploys three serious games with various topics in an entry-level C Programming module and investigates students’ learning outcomes. The study also explores whether learners belonging to different subgroups benefit more from the use of serious games than their peers. The subgroups are formed based on learner demographics that capture learners’ attitude toward school or STEM subjects, their previous educational performance and gender. Background: Despite the latest rapid economy growth in the ICT sector, many European countries are facing the challenge of retaining students in STEM-related subjects, which could lead to unfilled vacancies in the ICT job markets in the near future. Serious games have been utilized in the classrooms of many STEM subjects to improve students’ learning experience and learning outcomes, and potentially encourage their engagement with STEM-related industries. While some prior works had assessed the effectiveness of serious games in improving students’ learning outcomes, little research has been done to investigate the impacts among students with different previous educational background and performance, attitude, and gender. Research Questions: 1) Do the proposed serious games improve students’ learning outcomes? and 2) Do students with certain previous educational performance, learning attitude, and/or gender benefit more than others from the use of serious games? Methodology: To thoroughly study students’ learning outcome, a large-scale pilot was deployed as part of the first-year undergraduate C Programming module at Dublin City University, Ireland. A multidimensional pedagogical assessment toolkit was utilized. In particular, a demographic questionnaire was carried out before the pilot began, based on which students were divided into different subgroups in terms of educational ability, initial attitude to school, attitude toward learning STEM subjects, and gender. Pre- and post-tests were conducted right before and after playing each game. For students belonging to each subgroup and for all students, the average pre- and post-test marks related to each game were compared, while paired-sample $t$ -tests were also conducted to assess the statistical significance of knowledge gain. Findings: Statistically significant knowledge gains were observed in all three games for all students. The students with good previous educational performance or strong attitude toward attending school and learning STEM subjects, tend to gain more by using serious games, as they obtained statistically significant improved learning outcomes in all three games. The students with average starting points, although performed better in the post-test than in the pretest in all games, they achieved statistically significant improvements in some cases only.