0

Recently I've asked a question with a code mistake in C, and I received an answer that the goto statement can be harmful in certain situations. I'd like to know if it's a bad idea to use goto statements and why it's a bad idea.

I generally prefer using goto instead of the rest of the loops because it's generally easier and has never failed me so far. I've been using goto statements for a while in my programs to make them repeat themselves from certain points to help me with debugging, without having to re-open my program many times.

So basically, is the goto statement bad to use? If so, why? What can it do bad exactly?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Bugster
  • 1,552
  • 8
  • 34
  • 56

0 Answers0