I think the last line should be "substr[i] = '\0';" to handle the "error2" case correctly. As written, the null terminator could be written to a location past the end of the "substr" array, possibly overwriting something important or causing a GPF.
@PortfolioCourses8 ай бұрын
I’m going to check this out and fix it if so, thanks. :-)
@kuroko30733 жыл бұрын
tahnk u, can u plz make a vd about split and strjoin?
@PortfolioCourses3 жыл бұрын
We have this video on string concatenation that you might enjoy: kzbin.info/www/bejne/lWiqgYODhtuCbpY For split and strjoin, we can very likely make videos on those functions... that actually would be pretty fun I think. :-D Are you thinking about functions from any other language in particular, like say Python or JavaScript? Or do you just mean general string split and join functions?
@kuroko30733 жыл бұрын
@@PortfolioCoursesin general string ....that would be nice
@PortfolioCourses3 жыл бұрын
@@kuroko3073 OK sounds good, I'll likely make it most similar to how Python and JavaScript's split and join functions work since that is likely what many people will expect for those functions. :-)
@TANMAYEEGOSAVI Жыл бұрын
I have done exactly same way for date(day, month, year) , no error , but displaying values in form stickers . Help me to rectify.
@PortfolioCourses Жыл бұрын
The original code in this video is found here Tanmayee: github.com/portfoliocourses/c-example-code/blob/main/substring.c. Have you tried using that version of the code? Maybe that will help? :-)
@TANMAYEEGOSAVI Жыл бұрын
@@PortfolioCourses It was helpful, problem solved ,Thank you sir
@PortfolioCourses Жыл бұрын
@@TANMAYEEGOSAVI Awesome, I'm glad it was helpful! 🙂
@TANMAYEEGOSAVI Жыл бұрын
@@PortfolioCoursessir, what if i want to add switch case method and display parameters for another case ? How to do that ?