Interviewer And Interviewee Guide

Apple Interview Question:

Write a function:
char * CreateEmptyString(int len);
function should return an pointer to an empty string of length len

Submitted by: Administrator
char * setEmpty(int len){
if (0>len) return NULL;
char * c = (char *) malloc(len+1);
memset(c, 0, len+1);
return c;
}
Submitted by: Administrator

Read Online Apple Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.