Language: C

#include<stdio.h>
int main(void) {
  int dayname;
  char dayname[100]
  if(dayname = 'SUN') {
    printf(7);
  }
  else if (dayname = 'MON') {
    printf(6);
  }
  else if(dayname = 'TUE') {
    printf(5);
  }
  else if(dayname = 'WED') {
    printf(4);
  }
  else if(dayname = 'THU') {
    printf(3);
  }
  else if(dayname = 'FRI') {
    printf(2);
  }
  else if(dayname = 'SAT') {
    printf(1);
  }
  return 0;

}

Compiler output:
main.c: In function 'main':
main.c:5:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'if'
    5 |   if(dayname = 'SUN') {
      |   ^~
main.c:5:16: warning: multi-character character constant [-Wmultichar]
    5 |   if(dayname = 'SUN') {
      |                ^~~~~
main.c:6:12: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
    6 |     printf(7);
      |            ^
      |            |
      |            int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:8:22: warning: multi-character character constant [-Wmultichar]
    8 |   else if (dayname = 'MON') {
      |                      ^~~~~
main.c:9:12: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
    9 |     printf(6);
      |            ^
      |            |
      |            int
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:11:21: warning: multi-character character constant [-Wmultichar]
   11 |   else if(dayname = 'TUE') {
      |                     ^~~~~
main.c:12:12: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   12 |     printf(5);
      |            ^
      |            |
      |            int
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:14:21: warning: multi-character character constant [-Wmultichar]
   14 |   else if(dayname = 'WED') {
      |                     ^~~~~
main.c:15:12: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   15 |     printf(4);
      |            ^
      |            |
      |            int
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:17:21: warning: multi-character character constant [-Wmultichar]
   17 |   else if(dayname = 'THU') {
      |                     ^~~~~
main.c:18:12: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   18 |     printf(3);
      |            ^
      |            |
      |            int
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:20:21: warning: multi-character character constant [-Wmultichar]
   20 |   else if(dayname = 'FRI') {
      |                     ^~~~~
main.c:21:12: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   21 |     printf(2);
      |            ^
      |            |
      |            int
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:23:21: warning: multi-character character constant [-Wmultichar]
   23 |   else if(dayname = 'SAT') {
      |                     ^~~~~
main.c:24:12: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   24 |     printf(1);
      |            ^
      |            |
      |            int
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~