Technical Maintenance on Saturday, December 7, between 09:00 and 12:00 UTC. The site will be unavailable during that time.
Uploaded by Background Pony #D2C8
 1620x1411 JPG 162 kB
Interested in advertising on Derpibooru? Click here for information!
Sky Railroad Merch Shop!

Help fund the $15 daily operational cost of Derpibooru - support us financially!

Description
safe2268969 artist:awr-hey6 rainbow dash290983 pegasus537291 anthro383067 g42127759 book45900 breasts416122 c (language)17 clothes679116 colored ear fluff443 confused7058 dialogue100285 ear fluff57018 eyebrows29504 female1910673 frown38506 half body690 k&r6 mare807093 one ear down1671 open mouth257235 programming141 raised eyebrow10482 reading8579 shirt45092 simple background639042 solo1506583 speech bubble44133 talking12084 unsafe12 white background177336

Comments

Syntax quick reference: **bold** *italic* ||hide text|| `code` __underline__ ~~strike~~ ^sup^ %sub%

Detailed syntax guide

Background Pony #707C
@Background Pony #4F12
Unsafe as in prone to security vulnerabilities. C is simple, but it’s not easy. We are humans and we have made, are making and will keep making mistakes. This is unavoidable. And in C mistakes can easily result in vulnerabilities.
Entire classes of vulnerabilities can be eliminated by simply using another, safer language. Of course, there’s always a tradeoff: maybe lower performance, maybe more mental effort, maybe slower compilation time… In most cases the tradeoff is worth it. There’s a reason website backends are no longer written in C.
Thanks for the *(char*)0 = 0; link, it’s interesting.
Background Pony #4F12
What do you mean unsafe? Do you mean language breaks in some cases? Do you mean language breaks user in some cases? Or do you mean programming in C makes you pregnant?
TL;DR: You are clearly dereferencing null pointer, what do you intend to do? Do you intend to trap execution? Do you intend to tell this code is unreachable? Do you intend to actually write to zero address?
LemonDrop
Duckinator - Same nonsensical quacks in every pond
Nightmare in the Moon - Had their OC in the 2024 Derpibooru Collab.
Pixel Perfection - I still call her Lightning Bolt
Lunar Guardian - Earned a place among the ranks of the most loyal New Lunar Republic soldiers (April Fools 2023).
Crystal Roseluck - Had their OC in the 2023 Derpibooru Collab.
Elements of Harmony - Had an OC in the 2022 Community Collab
Non-Fungible Trixie -
Twinkling Balloon - Took part in the 2021 community collab.
Ten years of changes - Celebrated the 10th anniversary of MLP:FiM!
My Little Pony - 1992 Edition

C++ Crazed
@a3x
Sure it has more features which can be a bad thing for language complexity, but not that many really. C89 is borderline unusable for the simple reason of not being able to place decls anywhere you want in a scope (only at the top). This really only was done because C89 is ancient and they had no idea how annoying that’d be at the time (well C got the idea from B, dunno why it decided to do that because I am pretty sure other languages at the time did allow it, but I digress).
As an aside C99’s designated initializers also are based and make code look a lot less cryptic and confusing with various APIs (like say Vulkan’s C API), so those are also quite nice.
Really C89 and C99 both have a ton of pitfalls in general due to being so old (being weakly typed really is the reason for most of the issues), I’d recommend a more modern language like Zig if you want to have a simple and fast language that is just more up to date in modern language design and safety features (or Rust as a more complex option but still sharing many of the same ideas).
a3x
My Little Pony - 1992 Edition

@byte[]  
I believe c99 has too many comfort features. Meaning that the pitfalls of c89 are easier to find and walk into than those of c99 - and thereby I feel like averting more small errors, that usually would come up when debugging at the end.
Background Human
Lunar Supporter - Helped forge New Lunar Republic's freedom in the face of the Solar Empire's oppressive tyrannical regime (April Fools 2023).
Preenhub - We all know what you were up to this evening~
My Little Pony - 1992 Edition
Not a Llama - Happy April Fools Day!

CHS, Class of 20XX
@flashman07  
C is a good language for learning computer hardware. It’s assembly with better syntax. None of the fancy abstractions that characterize modern languages. You have to know how things work at the level of bits and bytes if you want to get anything done.
JP
Cutest Little Devil - Celebrated the 14th anniversary of MLP:FIM!
Rainbow Rocks 10th Anniversary: Sonata Dusk - Celebrated the 10th anniversary of EQG Rainbow Rocks!
Nightmare in the Moon - Had their OC in the 2024 Derpibooru Collab.
Pixel Perfection - I still call her Lightning Bolt
Silly Pony - Celebrated the 13th anniversary of MLP:FIM, and 40 years of MLP!
Shimmering Smile - Celebrated the 10th anniversary of Equestria Girls!
Solar Guardian - Refused to surrender in the face of the Lunar rebellion and showed utmost loyalty to the Solar Empire (April Fools 2023).
Roseluck - Had their OC in the 2023 Derpibooru Collab.
King Sombra - Celebrated the 10th anniversary of The Crystal Empire!
A Lovely Nightmare Night - Celebrated the 12th anniversary of MLP:FIM!

I miss the show so much
That book should be kept around only as a historical reference today. It was a good book, but that was decades ago. If you really want to learn C today, use a more modern book that does not, for example, completely ignore any and all error checking/handling. You’re writing C, so properly validating input and fully handling errors is your #0 priority because the language does not do any of it for you.
flashman07

Queen Chrysalis Minion
I still have that book from my university days. C is powerful but there are very few guard rails. You are responsible for making sure functions aren’t called with malicious/bad values.