Pergunta de entrevista da empresa Apple

write atoi()

Respostas da entrevista

Sigiloso

17 de dez. de 2010

// should be OK for base 10 int atoi(char* string) { int val = 0; // check if value is negative bool negative = *string == '-'; // skip sign if(negative || *string = '+') string++; while(*string) { // accumulate digits val = 10*val + (*string - '0'); string++; } // remember to check for sign if(negative) val = -val; return val; }

Sigiloso

15 de mar. de 2015

Enrico, you didn't consider integer overflow case .. INT_MAX, INT_MIN.

Sigiloso

11 de fev. de 2016

Can you tell me what did the director spoke to you... please I have my round in few days.

Sigiloso

13 de fev. de 2016

HEYY !! can you PLEASE tell what was asked in the director round ???????? PLEASE!!!!!!!!

Sigiloso

9 de fev. de 2016

Can you please tell me questions that were asked in your onsite interview with Apple as a build engineer ?