Qualcomm Interview Question
Software Engineer / Developersthe simplest would be
char *strcpy(char *dst, const char *src)
{
char *rettmp = dst; ///return pointer
///pointer and len must have being validated prior invoking this function
while ((*dst++ = *src++) != '\0')
/* nothing needs to be done, sometimes compiler optimizations can create problem but most versions of the gcc works fine*/;
return rettmp;
}
One more thing, if you have embedded experience then do a thorough reading on OS concepts. they will try to confuse you to the core. Most of the time u will be knowing the answer but when u answer the question the expect a complete A-to-Z details about that topic...Be prepared for RTOS and basic OS concepts...Its very important
- Vishal August 03, 2010