Easy Interview Questions | Glassdoor

Find your next job here

Easy Interview Questions

91

interview questions shared by candidates

Easy Interview Questions

Sort: RelevancePopular 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; }

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

2 Answers

level order print a given tree

2 Answers

Tell us about your past clients and what you did for them?

1 Answer

When I tried to explain the different DocTypes of HTML, the interviewer was looking for a detailed answer probably involving who invented HTML and who added the idea of DocTypes to it.

1 Answer

"Why LA Fitness?"

1 Answer

Does this job sound like something that would interest you?

1 Answer

Most of the questions were very general and straightforward. The only somewhat difficult question would probably be attempting to sell the pen to the third interviewer. Luckily, the pen was made of recycled-content, which provided a large selling point.

1 Answer

All questions are typical and easy to answer.

1 Answer
110 of 91 Interview Questions