Language: C

#include<stdio.h>
int main(void) {
  int dayname;
  scanf("%d",&dayname);
  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(daynemr = 'THU') {
    printf(3);
  }
  else if(daynemr = 'FRI') {
    printf(2);
  }
  else if(daynemr = 'SAT') {
    printf(1);
  }
  return 0;

}

Compiler output:
main.c: In function 'main':
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:11: error: 'daynemr' undeclared (first use in this function); did you mean 'dayname'?
   17 |   else if(daynemr = 'THU') {
      |           ^~~~~~~
      |           dayname
main.c:17:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:21: warning: multi-character character constant [-Wmultichar]
   17 |   else if(daynemr = '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(daynemr = '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(daynemr = '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, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~