lochnesssnowman
Member
Hiya, got a couple of questions I came across that I could use a little help with. I've seen a few people about here that are good with this kind of thing.
Question 1:
Imagine you are a software engineer on a game team that is very close to the completion deadline. Playtesting has uncovered a big problem - occasionally the game will unexpectedly crash! What has been observed is:
o - the crash cannot be repeated at will (it seems to 'randomly' appear about once or twice a day through playtesting).
o - When viewing through the debugger, it appears that a certain structure in memory has been overwritten with some invalid data.
Bearing in mind the impending deadline, what steps would you take to resolve this mysterious memory scribble.
Question 2:
Write a function that will reverse a string (i.e. "jim" becomes "mij"). If possible, do this "in place", i.e. without any additional memory allocations. Allow for the terminating NULL as well (which shoiuld be kept at the end).
Function prototype
char* stringReverse(char* string);
And that's that. If anyone can offer some suggestions that would be class. I'm off to work the now but I'll be on after. Cheers for any help in advance.
Question 1:
Imagine you are a software engineer on a game team that is very close to the completion deadline. Playtesting has uncovered a big problem - occasionally the game will unexpectedly crash! What has been observed is:
o - the crash cannot be repeated at will (it seems to 'randomly' appear about once or twice a day through playtesting).
o - When viewing through the debugger, it appears that a certain structure in memory has been overwritten with some invalid data.
Bearing in mind the impending deadline, what steps would you take to resolve this mysterious memory scribble.
Question 2:
Write a function that will reverse a string (i.e. "jim" becomes "mij"). If possible, do this "in place", i.e. without any additional memory allocations. Allow for the terminating NULL as well (which shoiuld be kept at the end).
Function prototype
char* stringReverse(char* string);
And that's that. If anyone can offer some suggestions that would be class. I'm off to work the now but I'll be on after. Cheers for any help in advance.