Ok man, sorry, i just thought that it had something to do with the OS and not with my code.
Here:
Code:
#include <stdio.h>
#include <string.h>
int main(){
FILE *ptr;
FILE *ptrout=fopen("fileb.exe","wb");
long size=0,i;
if(ptr=fopen("filea.exe","rb"));
else printf("could not open file");
fseek (ptr, 0, SEEK_END);
size = ftell (ptr);
rewind (ptr);
printf("size=%d\n",size);
system("pause");
for(i=0;i<size;i++){
fputc(fgetc(ptr),ptrout);
printf("i=%d\n",i);}
fclose(ptr);
fclose(ptrout);
printf("Successfully Copied!\n");
system("pause");
return 0;}