Software Senior Interview Questions

75,746 software senior 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 2371 - 2380 interview questions

Glassdoor has 75,746 interview questions and reports from Software senior interviews. Prepare for your interview. Get hired. Love your job.