Easy Interview Questions | Glassdoor

Easy Interview Questions

91

interview questions shared by candidates

Easy Interview Questions

Sort: Relevance Popular Date

Write a function that allows to convert a string to the corresponding number (i.e. implement the atoi() C function)

4 Answers

int my_atoi(char* pStr) { if (pStr == NULL) { printf("ERROR: null string.\n"); return -1; } int num = 0; int pos; for (pos = 0; ; pos++) { char currChar = *(pStr+pos); // Check whether the current char is not a digit if ( currChar '9' ) return num; // Read the number and add it to the 'num' variable num = (num*10) + (int) currChar - (int)'0'; } return num; }

int atoi(char *s) { int i = 0; while(*s) { i = (i<<3) + (i<<1) + (*s - '0'); s++; } return i; }

int atoi(char *s) { int i=0; while(*s) { i = i*10 + (*s- '0'); s++; } return i; }

level order print a given tree

2 Answers

When was the last time the two hands of the clock were aligned if it is 12 right now?

2 Answers

did you graduate college?

1 Answer

What entices you about this role and would you say you have hard skills or soft skills?

1 Answer

No surprises. Availability is the big question.

1 Answer

When can you start?

1 Answer

What did you not like about yor last supervisor?

1 Answer

Tell me about about a situation you had that proved to be difficult for you?

1 Answer

are you ok with working mornings?

2 Answers
110 of 91 Interview Questions