Language: C

  1 #include <stdio.h>                                                                                                    2                                                                                                                       3 int main(void)                                                                                                        4 {                                                                                                                     5     int i,n,ac_count,wa_count,tle_count,re_count;                                                                     6     char str[4];                                                                                                      7                                                                                                                       8     ac_count = wa_count = tle_count = re_count = 0;                                                                   9                                                                                                                      10     scanf("%d",&n);                                                                                                  11                                                                                                                      12     for(i=0;i<n;i++){                                                                                                13         scanf("%s",str);                                                                                             14         if(str[0]=='A'){                                                                                             15             ac_count++;                                                                                              16         }                                                                                                            17         else if(str[0]=='W'){                                                                                        18             wa_count++;                                                                                              19         }                                                                                                            20         else if(str[0]='T'){                                                                                         21             tle_count++;                                                                                             22         }                                                                                                            23         else if(str[0]='R'){                                                                                         24             re_count++;                                                                                              25         }                                                                                                            26     }                                                                                                                27                                                                                                                      28     printf("AC * %d\nWA * %d\nTLE * %d\nRE * %d\n",ac_count,wa_count,tle_count,re_count);                            29                                                                                                                      30     return 0;                                                                                                        31 } 

Compiler output:
main.c:1:3: error: expected identifier or '(' before numeric constant
    1 |   1 #include <stdio.h>                                                                                                    2                                                                                                                       3 int main(void)                                                                                                        4 {                                                                                                                     5     int i,n,ac_count,wa_count,tle_count,re_count;                                                                     6     char str[4];                                                                                                      7                                                                                                                       8     ac_count = wa_count = tle_count = re_count = 0;                                                                   9                                                                                                                      10     scanf("%d",&n);                                                                                                  11                                                                                                                      12     for(i=0;i<n;i++){                                                                                                13         scanf("%s",str);                                                                                             14         if(str[0]=='A'){                                                                                             15             ac_count++;                                                                                              16         }                                                                                                            17         else if(str[0]=='W'){                                                                                        18             wa_count++;                                                                                              19         }                                                                                                            20         else if(str[0]='T'){                                                                                         21             tle_count++;                                                                                             22         }                                                                                                            23         else if(str[0]='R'){                                                                                         24             re_count++;                                                                                              25         }                                                                                                            26     }                                                                                                                27                                                                                                                      28     printf("AC * %d\nWA * %d\nTLE * %d\nRE * %d\n",ac_count,wa_count,tle_count,re_count);                            29                                                                                                                      30     return 0;                                                                                                        31 }
      |   ^
main.c:1:5: error: stray '#' in program
    1 |   1 #include <stdio.h>                                                                                                    2                                                                                                                       3 int main(void)                                                                                                        4 {                                                                                                                     5     int i,n,ac_count,wa_count,tle_count,re_count;                                                                     6     char str[4];                                                                                                      7                                                                                                                       8     ac_count = wa_count = tle_count = re_count = 0;                                                                   9                                                                                                                      10     scanf("%d",&n);                                                                                                  11                                                                                                                      12     for(i=0;i<n;i++){                                                                                                13         scanf("%s",str);                                                                                             14         if(str[0]=='A'){                                                                                             15             ac_count++;                                                                                              16         }                                                                                                            17         else if(str[0]=='W'){                                                                                        18             wa_count++;                                                                                              19         }                                                                                                            20         else if(str[0]='T'){                                                                                         21             tle_count++;                                                                                             22         }                                                                                                            23         else if(str[0]='R'){                                                                                         24             re_count++;                                                                                              25         }                                                                                                            26     }                                                                                                                27                                                                                                                      28     printf("AC * %d\nWA * %d\nTLE * %d\nRE * %d\n",ac_count,wa_count,tle_count,re_count);                            29                                                                                                                      30     return 0;                                                                                                        31 }
      |     ^