C (programming language): Difference between revisions

[accepted revision][accepted revision]
Content deleted Content added
m Reverting possible vandalism by 202.12.83.216 to version by Fbergo. Report False Positive? Thanks, ClueBot NG. (4383135) (Bot)
m Limitations: edited author name in citation to remove warning and changed date format to match others
Line 567:
{{Rquote|quote=the power of assembly language and the convenience of ... assembly language |author=Dennis Ritchie<ref>{{cite magazine |last1=Metz |first1=Cade |title=Dennis Ritchie: The Shoulders Steve Jobs Stood On |url=https://www.wired.com/2011/10/thedennisritchieeffect/ |magazine=Wired |access-date=April 19, 2022 |archive-date=April 12, 2022 |archive-url=https://web.archive.org/web/20220412005125/http://www.wired.com/2011/10/thedennisritchieeffect/ |url-status=live }}</ref>}}
While C has been popular, influential and hugely successful, it has drawbacks, including:
* The standard [[dynamic memory]] handling with <code>malloc</code> and <code>free</code> is error prone. Improper use can lead to [[memory leaks]] and [[dangling pointers]].<ref>{{cite web |last1=Group |first1author=Internet Security Research Group |title=What is memory safety and why does it matter? |url=https://www.memorysafety.org/docs/memory-safety/ |website=Prossimo |access-date=March 3, 2025-03-03}}</ref>
* The use of pointers and the direct manipulation of memory means corruption of memory is possible, perhaps due to programmer error, or insufficient checking of bad data.
* There is some [[type checking]], but it does not apply to areas like [[variadic functions]], and the type checking can be trivially or inadvertently circumvented. It is [[Strong and weak typing|weakly typed]].