Searching for "move()"

Q:

How would you use the function memmove()?

Answer

#include "mem.h"


#include "alloc.h"


main()


{


      int area;


      char *dest;


      char src[] = "Life is the camera and you are the target"


                                  "so keep smiling always";


      area = sizeof (src);


      dest = malloc (area);


      memmove (dest, src, area);


      printf("\n%s", dest);


      printf("\n%s",src);


}

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

Q:

What is the difference between using copy() and move() function in php file uploading?

Answer

Copy() makes a copy of the file. It returns TRUE on success. It can copy from any source to destination. Move simply Moves the file to destination if the file is valid. While move can move the uploaded file from temp server location to any destination on the server. If filename is a valid upload file, but cannot be moved for some reason, no action will occur.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP