Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
    char s[3];
    int i=0,l=0;
    scanf("%s",&s);
    printf("%d",l);
    if(strcmp(s[3],"SUN")==0){
        printf("7");
    }    if(strcmp(s[3],"SAT")==0){
        printf("1");
    }    if(strcmp(s[3],"MON")==0){
        printf("6");
    }    if(strcmp(s[3],"TUS")==0){
        printf("5);
    }    if(strcmp(s[3],"WEN")==0){
        printf("4");
    }   if(strcmp(s[3],"THR")==0){
        printf("3");
    }   if(strcmp(s[3],"FRI")==0){
        printf("2");
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:16: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   10 |     if(strcmp(s[3],"SUN")==0){
      |               ~^~~
      |                |
      |                char
In file included from main.c:3:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:12:21: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   12 |     }    if(strcmp(s[3],"SAT")==0){
      |                    ~^~~
      |                     |
      |                     char
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:14:21: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   14 |     }    if(strcmp(s[3],"MON")==0){
      |                    ~^~~
      |                     |
      |                     char
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:16:21: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   16 |     }    if(strcmp(s[3],"TUS")==0){
      |                    ~^~~
      |                     |
      |                     char
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:17:16: warning: missing terminating " character
   17 |         printf("5);
      |                ^
main.c:17:16: error: missing terminating " character
   17 |         printf("5);
      |                ^~~~
main.c:18:5: error: expected expression before '}' token
   18 |     }    if(strcmp(s[3],"WEN")==0){
      |     ^
main.c:17:16: error: expected ';' before '}' token
   17 |         printf("5);
      |                ^
      |                ;
   18 |     }    if(strcmp(s[3],"WEN")==0){
      |     ~           
main.c:18:21: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   18 |     }    if(strcmp(s[3],"WEN")==0){
      |                    ~^~~
      |                     |
      |                     char
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:20:20: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   20 |     }   if(strcmp(s[3],"THR")==0){
      |                   ~^~~
      |                    |
      |                    char
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:22:20: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   22 |     }   if(strcmp(s[3],"FRI")==0){
      |                   ~^~~
      |                    |
      |                    char
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~