
194 Programming in C
Explanation:
In the above program, the number of students whose result is to be calculated is entered.
After this, the marks of six subjects with their roll numbers are entered. The sum of six
subjects is calculated. The sum is compared with distinction, first and second macros using
if–else ladder and appropriate result is displayed.
In this program, macros are used. During preprocessing, the preprocessors replace every occur-
rence of distinction with 420, similarly, first and second are replaced with 360 and 240, respectively.
Distinction, first and second in the above program are ‘macro templates’, whereas ...