26

cross-posted from: https://lemm.ee/post/4890334

cross-posted from: https://lemm.ee/post/4890282

let's say I have this code

` #include #include char name[50]; int main(){ fgets(name,50,stdin); name[strcspn(name, "\n")] = '\0'; printf("hi %s", name); }

` and I decide my name is "ewroiugheqripougheqpiurghperiugheqrpiughqerpuigheqrpiugherpiugheqrpiughqerpioghqe4r", my program will throw some unexpected behavior. How would I mitigate this?

you are viewing a single comment's thread
view the rest of the comments
[-] DirigibleProtein@aussie.zone 5 points 1 year ago
[-] hairyballs@programming.dev 7 points 1 year ago* (last edited 1 year ago)

The first article is funny, because I moved from my native country to the one right next to it, and everybody is confused by my name. They have one given name and 2 family names, while I have 4 first names, and a compound last name.

No need to travel to the other side of the planet to meet a different culture of naming.

[-] floppy@rabbitea.rs 2 points 1 year ago
[-] DirigibleProtein@aussie.zone 2 points 1 year ago

Wow. Almost worth changing my name again just to fuck with them.

this post was submitted on 21 Aug 2023
26 points (100.0% liked)

Programming

17196 readers
385 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS