Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
It puts the null terminator at the end of both strings.
Hey there! What I've written in those comments was a mistake and if you have a look at my solution you'd see that I haven't declared my variable as a static one. However, you're completely right on this and I've taken your advice. I've seen that static char variables could be easily viewed with things like readelf. Thank you for reminding me again! Happy coding!
Dear Dansaki,
I ve noticed that you store result into static char variable complement;
I would try t store it into char * ptr_complement.
Otherwise you could breach some data in the memory space denoted for static variables
Sounds interesting! I will go for it!
Glad you found it useful!
Psssst! Give this exercise a shot - you will enjoy it.
Happy coding!
Hi!
I can't thank you enough. You showed me step by step what I was doing wrong and what I could have done more accurately. You also made revisions on your own forks to help me understand the final code much easier! I learnt where I was doing unnecessary codes and how I could re-write them way simpler.Your use of strchr() and strrchr() functions was smart! It was much simpler and easier. Again Thankyou for giving so much of your time and sharing your knowledge and experience with me!
The moment of Wow! Such a smart move!
I really enjoyed this part! Finding the first occurance and then searching from on step further on!
Before reading your revisions I wasn't aware of how useful strchr() is. It simply eliminated the for loop. Nul terminating the distincts that I didn't! Thankyou for showing me that
I have a bad habit of doing everything in a manner of too "step by step". But now I've learnt to avoid it. Also how my code compares complex to yours. Not freeing string, Oh! my really bad mistake!
@dansaki FWIW,
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...