Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Companies Job Interviews:AppleCompany KnowledgeFedExGoogleIBMInfosysMicrosoftTCSWipro
Copyright © 2018. All Rights Reserved
Apple Interview Question:
Write a function:
char * CreateEmptyString(int len);
function should return an pointer to an empty string of length len
Submitted by: Administratorchar * setEmpty(int len){
if (0>len) return NULL;
char * c = (char *) malloc(len+1);
memset(c, 0, len+1);
return c;
}
Submitted by: Administrator
if (0>len) return NULL;
char * c = (char *) malloc(len+1);
memset(c, 0, len+1);
return c;
}
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.