Criticism of the C programming language: Difference between revisions

Content deleted Content added
Per previous consensus, we don't use source tags here. C does have built-in string support, just not the kind you might prefer.
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 35 ⟶ 34:
 
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:
<source lang="cpp"> stack.push(val);</source>
one would write in C:
<source lang="c"> push(&stack,val);</source>
 
==Undefined behaviour==