Software Engineer Sr Interview Questions

71,758 software engineer sr interview questions shared by candidates

Write a function in C that takes a string, and in-place xors the first char with the last, second with second last, etc., and after the middle part sets the char to 0. Do this efficiently. Is strlen after the function always equal to (strlen before +1)/2? When is it not?
avatar

Senior Software Engineer

Interviewed at Google

4.4
Jan 22, 2014

Write a function in C that takes a string, and in-place xors the first char with the last, second with second last, etc., and after the middle part sets the char to 0. Do this efficiently. Is strlen after the function always equal to (strlen before +1)/2? When is it not?

Viewing 2251 - 2260 interview questions

Glassdoor has 71,758 interview questions and reports from Software engineer sr interviews. Prepare for your interview. Get hired. Love your job.