Criticism of the C programming language: Difference between revisions

Content deleted Content added
Line 49:
These operations are all programming errors that could occur using many programming languages; C draws criticism because its standard explicitly identifies numerous cases of undefined behavior, including some where the behavior could have been made well defined, and does not specify any run-time error handling mechanism.
 
Invoking <code>[[fflush]]()</code> on a stream opened for input is an example of a different kind of undefined behavior, not necessarily a programming error but a case for which some conforming implementations may provide well-defined, useful semantics (in this example, presumably discarding input through the next new-line) as an allowed ''extension''.
* invoking <code>[[fflush]]()</code> on a stream opened for input
 
is an example of a different kind of undefined behavior, not necessarily a programming error but a case for which some conforming implementations may provide well-defined, useful semantics (in this example, presumably discarding input through the next new-line) as an allowed ''extension''.
 
==Memory allocation==