goto Statement in C || Lesson 41 || C Programming || Learning Monkey ||
Автор: Wisdomers - Computer Science and Engineering
Загружено: 2021-07-06
Просмотров: 11672
Описание:
goto statement in C
In this class, we will understand the goto Statement in C.
We have already discussed the break and continue jump statements.
Table of Contents
goto statement
goto statement Example
goto statement
Unlike break and continue statements, goto will work with in the function.
The goto statement can jump to any statement in a function, provided that the statement has a label.
A label is just an identifier placed at the beginning of a statement.
goto statement Example
The image below is a programming example on a goto statement.
goto Statement in C Example
goto Statement in C Example
The above program is the same that we have used in the break statement to find whether the number is prime or not.
The difference is instead of break, we have used the goto statement with a label named done.
Label done is an identifier used at the beginning of the statement from where the program execution has to be started after jumping.
As the label ‘done’ is provided at the end of the loop, the program’s execution will jump to that label, and the next line will get executed.
#learningmonkey #cprogrammingforbeginners #placements #gatecse #cprogramming #cprogramminglanguage
Link for playlists:
/ @wisdomerscse
Link for our website: https://learningmonkey.in
Follow us on Facebook @ / learningmonkey
Follow us on Instagram @ / learningmonkey1
Follow us on Twitter @ / _learningmonkey
Mail us @ [email protected]
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: