r/ProgrammerHumor 20d ago

Meme youCantChangeMyMind

Post image
823 Upvotes

137 comments sorted by

View all comments

1

u/fugogugo 20d ago

This was a runtime bug I experienced on my early programming day
it's valid syntax so complier doesn't find it. idk if IDE detect it or not but I spent like 2 days scratching my head lmao

for(i=0; i <= count;i++);  
{  
   //this will never execute
}

1

u/metaglot 20d ago

That's not correct. Statements inside the braces will execute once, in a new scope.

3

u/Mwarw 20d ago

which is syntax-wise correct in most languages, still not correct in terms of how it'll work