Update shit

This commit is contained in:
Miloslav Ciz 2022-05-07 16:56:28 +02:00
parent 5db91153c8
commit cb4c18f285
14 changed files with 52 additions and 17 deletions

View file

@ -42,7 +42,7 @@ int main(void)
Besides being extra careful about writing memory safe code, one needs to also know that **some functions of the standard library are memory unsafe**. This is regarding mainly string functions such as `strcpy` or `strlen` which do not check the string boundaries (i.e. they rely on not being passed a string that's not zero terminated and so can potentially touch memory anywhere beyond); safer alternatives are available, they have an `n` added in the name (`strncpy`, `strnlen`, ...) and allow specifying a length limit.
## Different Behavior between C and C++
## Different Behavior Between C And C++
C is **not** a subset of C++, i.e. not every C program is a C++ program (for simple example imagine a C program in which we use the word `class` as an identifier). Furthermore a C program that is at the same time also a C++ program may behave differently when compiled as C vs C++. Of course, all of this may also apply between different standards of C, not just between C and C++.