Me and some other co-students we have a disagreement on checking the result of memcpy.
Based on these references
some of us believe that one can't check if memcpy failed unless if after use it, compare using memcmp the destination with source.
Some other co-students believe that one can check if memcpy fail by comparing the return value with NULL.Code:memcpy(dest,source,Size); if(memcmp(dest,source,Size) != 0) puts("Memcpy failed");
*Supose that dest/source/Size are validCode:if(memcpy(dest,source,Size) == NULL) puts("Memcpy failed");
Finally i also think that there is no point on check memcpy as far as i pass valid arguments.
Precaution is better than treatment !!!
We need an opinion here