Language: C++

#include<cstdio>
#include<cstring>
int main()
{
	int S,s1,s2,a;
	printf("Input S:");
	scanf("s%",&S);
	a=strlen(S);
	if(a=2)printf("%s\n",S);
	else if(a=3)
	{
		s1=S;
		s2=S;
		memmove(S,s1,1);
		memmove(s2,s1,1);
		memmove(s2,S,1);
		memmove(S,s2,2);
		printf("%s\n",s2);
	}
	else printf("wrong string\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
    8 |         a=strlen(S);
      |                  ^
      |                  |
      |                  int
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:2:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:14:25: error: invalid conversion from 'int' to 'void*' [-fpermissive]
   14 |                 memmove(S,s1,1);
      |                         ^
      |                         |
      |                         int
/usr/include/string.h:47:29: note:   initializing argument 1 of 'void* memmove(void*, const void*, size_t)'
   47 | extern void *memmove (void *__dest, const void *__src, size_t __n)
      |                       ~~~~~~^~~~~~
a.cc:14:27: error: invalid conversion from 'int' to 'const void*' [-fpermissive]
   14 |                 memmove(S,s1,1);
      |                           ^~
      |                           |
      |                           int
/usr/include/string.h:47:49: note:   initializing argument 2 of 'void* memmove(void*, const void*, size_t)'
   47 | extern void *memmove (void *__dest, const void *__src, size_t __n)
      |                                     ~~~~~~~~~~~~^~~~~
a.cc:15:25: error: invalid conversion from 'int' to 'void*' [-fpermissive]
   15 |                 memmove(s2,s1,1);
      |                         ^~
      |                         |
      |                         int
/usr/include/string.h:47:29: note:   initializing argument 1 of 'void* memmove(void*, const void*, size_t)'
   47 | extern void *memmove (void *__dest, const void *__src, size_t __n)
      |                       ~~~~~~^~~~~~
a.cc:15:28: error: invalid conversion from 'int' to 'const void*' [-fpermissive]
   15 |                 memmove(s2,s1,1);
      |                            ^~
      |                            |
      |                            int
/usr/include/string.h:47:49: note:   initializing argument 2 of 'void* memmove(void*, const void*, size_t)'
   47 | extern void *memmove (void *__dest, const void *__src, size_t __n)
      |                                     ~~~~~~~~~~~~^~~~~
a.cc:16:25: error: invalid conversion from 'int' to 'void*' [-fpermissive]
   16 |                 memmove(s2,S,1);
      |                         ^~
      |                         |
      |                         int
/usr/include/string.h:47:29: note:   initializing argument 1 of 'void* memmove(void*, const void*, size_t)'
   47 | extern void *memmove (void *__dest, const void *__src, size_t __n)
      |                       ~~~~~~^~~~~~
a.cc:16:28: error: invalid conversion from 'int' to 'const void*' [-fpermissive]
   16 |                 memmove(s2,S,1);
      |                            ^
      |                            |
      |                            int
/usr/include/string.h:47:49: note:   initializing argument 2 of 'void* memmove(void*, const void*, size_t)'
   47 | extern void *memmove (void *__dest, const void *__src, size_t __n)
      |                                     ~~~~~~~~~~~~^~~~~
a.cc:17:25: error: invalid conversion from 'int' to 'void*' [-fpermissive]
   17 |                 memmove(S,s2,2);
      |                         ^
      |                         |
      |                         int
/usr/include/string.h:47:29: note:   initializing argument 1 of 'void* memmove(void*, const void*, size_t)'
   47 | extern void *memmove (void *__dest, const void *__src, size_t __n)
      |                       ~~~~~~^~~~~~
a.cc:17:27: error: invalid conversion from 'int' to 'const void*' [-fpermissive]
   17 |                 memmove(S,s2,2);
      |                           ^~
      |                           |
      |                           int
/usr/include/string.h:47:49: note:   initializing argument 2 of 'void* memmove(void*, const void*, size_t)'
   47 | extern void *memmove (void *__dest, const void *__src, size_t __n)
      |                                     ~~~~~~~~~~~~^~~~~