Language: C

#include <unistd.h>
 
void ft_putchar(char c)
{
  char result;
  result = write(1, &c, 1);
}
 
void ft_putstr(char *str)
{
  while(*str)
    ft_putchar(*(str++));
}
 
int main(int ac, char **av)
{
  int i;
  int j;
  
  (void)ac;
  i = 0;
  while (av[1][i])
  {
    j = i + 1;
  		while (av[1][j])
        {
          if (av[1][i] = av[1][j])
          {
            ft_putstr("no");
            return 0;
          }
          j++;
        }
    i++;
  }
  ft_putstr("yes");
  return 0;
}
#include <unistd.h>
 
void ft_putchar(char c)
{
  char result;
  result = write(1, &c, 1);
}
 
void ft_putstr(char *str)
{
  while(*str)
    ft_putchar(*(str++));
}
 
int main()
{
  int i;
  int j;
  char c;
  
  (void)ac;
  read(S, c, 30);
  i = 0;
  while (c[i])
  {
    j = i + 1;
  		while (c[j])
        {
          if (c[i] = c[j])
          {
            ft_putstr("no");
            return 0;
          }
          j++;
        }
    i++;
  }
  ft_putstr("yes");
  return 0;
}
提出情報

Compiler output:
main.c:41:6: error: redefinition of 'ft_putchar'
   41 | void ft_putchar(char c)
      |      ^~~~~~~~~~
main.c:3:6: note: previous definition of 'ft_putchar' with type 'void(char)'
    3 | void ft_putchar(char c)
      |      ^~~~~~~~~~
main.c:47:6: error: redefinition of 'ft_putstr'
   47 | void ft_putstr(char *str)
      |      ^~~~~~~~~
main.c:9:6: note: previous definition of 'ft_putstr' with type 'void(char *)'
    9 | void ft_putstr(char *str)
      |      ^~~~~~~~~
main.c:53:5: error: redefinition of 'main'
   53 | int main()
      |     ^~~~
main.c:15:5: note: previous definition of 'main' with type 'int(int,  char **)'
   15 | int main(int ac, char **av)
      |     ^~~~
main.c: In function 'main':
main.c:54:1: error: number of arguments doesn't match prototype
   54 | {
      | ^
main.c:15:5: error: prototype declaration
   15 | int main(int ac, char **av)
      |     ^~~~
main.c:59:9: error: 'ac' undeclared (first use in this function); did you mean 'c'?
   59 |   (void)ac;
      |         ^~
      |         c
main.c:59:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:60:8: error: 'S' undeclared (first use in this function)
   60 |   read(S, c, 30);
      |        ^
main.c:60:11: error: passing argument 2 of 'read' makes pointer from integer without a cast [-Wint-conversion]
   60 |   read(S, c, 30);
      |           ^
      |           |
      |           char
In file included from main.c:1:
/usr/include/unistd.h:371:38: note: expected 'void *' but argument is of type 'char'
  371 | extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur
      |                                ~~~~~~^~~~~
main.c:62:11: error: subscripted value is neither array nor pointer nor vector
   62 |   while (c[i])
      |           ^
main.c:65:25: error: subscripted value is neither array nor pointer nor vector
   65 |                 while (c[j])
      |                         ^
main.c:67:16: error: subscripted value is neither array nor pointer nor vector
   67 |           if (c[i] = c[j])
      |                ^
main.c:67:23: error: subscripted value is neither array nor pointer nor vector
   67 |           if (c[i] = c[j])
      |                       ^
main.c: At top level:
main.c:79:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
   79 | 提出情報
      | ^~~~~~~~