[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Program Discussion :: Basics

Home > Programs > Basics

110 / 279

Can you write a program to implement memcpy. copy must be successful even source and destination address overlap.

Answer:

#include
#include
#include
using namespace std;

void myMemCpy(void *dest, void *src, size_t n)
{
char *csrc = (char *)src;
char *cdest = (char *)dest;

for (int i=0; i

Asked In :: Alcatel-Lucent

Post Your Answer Here:

Language:

Post Your Reply Here:



Language:

Post Your Reply Here: