user-0 提问: 有10个整数，使前面各数顺序向后移三个位置，最后3个数变成最前面3个数，实现此功能；能帮看看源程序改下么，我编译错了！谢谢了！

回复:
user: user-1
content: 几个问题： 1.void input(int *)应该是void input(int *a) 2.void swap(int *a[10])应该是void swap(int a[10]) 3.m + 2 = p + 9;也不对，你左边的m+2是个临时值，不能作为左值 PS：你根据编译器的错误提示一个个错误修改下去，遇到不会的拿去搜一下一般都能找到答案

user: user-2
content: memmove Moves one buffer to another.  void *memmove( void *dest, const void *src, size_t count );  Routine Required Header Compatibility  memmove <string.h> ANSI, Win 95, Win NT    For additional compatibility information, see Compatibility in the Introduction.  Libraries  LIBC.LIB Single thread static library, retail version  LIBCMT.LIB Multithread static library, retail version  MSVCRT.LIB Import library for MSVCRT.DLL, retail version    Return Value  memmove returns the value of dest.  Parameters  dest  Destination object  src  Source object  count  Number of bytes of characters to copy  Remarks  The memmove function copies count bytes of characters from src to dest. If some regions of the source area and the destination overlap, memmove ensures that the original source bytes in the overlapping region are copied before being overwritten.  Example  /* MEMCPY.C: Illustrate overlapping copy: memmove  * handles it correctly; memcpy does not.  */  #include <memory.h> #include <string.h> #include <stdio.h>  char string1[60] = "The quick brown dog jumps over the lazy fox"; char string2[60] = "The quick brown fox jumps over the lazy dog"; /*                           1         2         3         4         5  *                  12345678901234567890123456789012345678901234567890  */  void main( void ) {    printf( "Function:\tmemcpy without overlap\n" );    printf( "Source:\t\t%s\n", string1 + 40 );    printf( "Destination:\t%s\n", string1 + 16 );    memcpy( string1 + 16, string1 + 40, 3 );    printf( "Result:\t\t%s\n", string1 );    printf( "Length:\t\t%d characters\n\n", strlen( string1 ) );     /* Restore string1 to original contents */    memcpy( string1 + 16, string2 + 40, 3 );     printf( "Function:\tmemmove with overlap\n" );    printf( "Source:\t\t%s\n", string2 + 4 );    printf( "Destination:\t%s\n", string2 + 10 );    memmove( string2 + 10, string2 + 4, 40 );    printf( "Result:\t\t%s\n", string2 );    printf( "Length:\t\t%d characters\n\n", strlen( string2 ) );     printf( "Function:\tmemcpy with overlap\n" );    printf( "Source:\t\t%s\n", string1 + 4 );    printf( "Destination:\t%s\n", string1 + 10 );    memcpy( string1 + 10, string1 + 4, 40 );    printf( "Result:\t\t%s\n", string1 );    printf( "Length:\t\t%d characters\n\n", strlen( string1 ) ); }   Output  Function:   memcpy without overlap Source:      fox Destination:   dog jumps over the lazy fox Result:      The quick brown fox jumps over the lazy fox Length:      43 characters  Function:   memmove with overlap Source:      quick brown fox jumps over the lazy dog Destination:   brown fox jumps over the lazy dog Result:      The quick quick brown fox jumps over the lazy dog Length:      49 characters  Function:   memcpy with overlap Source:      quick brown dog jumps over the lazy fox Destination:   brown dog jumps over the lazy fox Result:      The quick quick brown dog jumps over the lazy fox Length:      49 characters   Buffer Manipulation Routines  See Also   _memccpy, memcpy, strcpy, strncpy

user: user-3
content: lz需要memmove...