In C++ programming, goto statement is used for altering the normal sequence of program execution by transferring control to some other part of the program. Syntax of goto Statementgoto label; In syntax above, label is an identifier. When Example 1: goto Statement
Output Maximum number of inputs: 10 You can write any C++ program with use of Reason to Avoid goto StatementThe goto statement gives power to jump to any part of program but, makes the logic of the program complex and tangled. In modern programming, goto statement is considered a harmful construct and a bad programming practice. Tag : C++ Flow Control, C++ if else, C++ for Loop, C++ do while Loop, C++ break & continue, C++ switch Statement, C++ goto Statement Selain Sebagai Penyedia Panduan Belajar Database dan Tutorial Pemrograman, Kami Juga Membagikan Kumpulan Source Code Program Aplikasi dan Ebook Pemrograman Terlengkap yang Bisa Anda Dapatkan Secara Gratis di Halaman : ADVERTISEMENT
Rekomendasi Web Hosting
|