What is the disadvantage of using go to and switch statement while developing a software... | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 10

What is the disadvantage of using go to and switch statement while developing a software...

Answer me fast...

22nd Sep 2017, 7:46 AM
Geeta P Jerkal
Geeta P Jerkal - avatar
2 Respostas
+ 22
My fast answer would be "Because goto statement makes your code like a dish of spaghetti". For long discussions have a look at [https://stackoverflow.com/questions/3517726/what-is-wrong-with-using-goto]
22nd Sep 2017, 8:05 AM
Babak
Babak - avatar
+ 10
when condition is wrong it enter into infinite loop in go to statement
22nd Sep 2017, 7:48 AM
Geeta P Jerkal
Geeta P Jerkal - avatar