How to play with strings in C

Donotalo
2581.9K views

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

There are many Standard C library functions which can be used devastatingly! If the programmer is not careful, s/he can leave bugs in his/her program deep inside. These bugs are very difficult to debug as they produce very unexpected behaviour and leave no trace. Many of the functions that deal with C strings fall into this category. In recent revisions of the standard many alternative safe functions are introduced. These safe functions are recommended to use. However, they are not strictly maintained by all compilers as the compiler developers are not forced to include all safe functions in their compiler package.

There will be many safety notes throughout this tutorial. Please read the safety warnings carefully and make sure you understand the consequence of using a function the wrong way. Follow best practices and avoid bad programming practice.

Open Source Your Knowledge: become a Contributor and help others learn. Create New Content