Criticism of the C programming language: Difference between revisions

Content deleted Content added
The previous text was clear enough, and the "fix" just raises further questions
Line 15:
 
C does not have some features that are available in some other programming languages:
* No string datatype (strings are stored as character arrays)
* No assignment of arrays or strings (copying can be done via standard functions; assignment of objects having <code>struct</code> or <code>union</code> type is supported)
* No [[Garbage collection (computer science)|automatic garbage collection]]
Line 34 ⟶ 35:
 
A number of these features are available as extensions in some compilers, or can be supplied by third-party libraries, or can be simulated by adopting certain coding disciplines. For example, in most object-oriented languages, method functions include a special "this" pointer which refers to the current object. By passing this pointer as an explicit function argument, similar functionality can be achieved in C. Whereas in C++ one might write:
stack-<source lang="cpp">stack.push(val);</source>
one would write in C:
<source lang="c">push(&stack,val);</source>
 
==Undefined behaviour==