Can someone tell me about goto statement on c++ and give an example too.
:) thank you
Do not give the answer by copying.
Answers
Answered by
1
Goto statement is used to skip or to make unconditional programming
I didn't understand the meaning of c++
I didn't understand the meaning of c++
suryanshmishra:
please mark brainliest or thanks
Answered by
3
hello here is your answer
A go to statement provides an unconditional jump from the goto to a labeled statement in the same function.ex-
#include <stdio.h>
int main()
{
int sum=0
; for(int i = 0; i<=10; i++){
sum = sum+i
; if(i==5){
goto addition;
}
}
addition:
printf("%d", sum);
return 0;
}
hope it helps!!!!!!!
A go to statement provides an unconditional jump from the goto to a labeled statement in the same function.ex-
#include <stdio.h>
int main()
{
int sum=0
; for(int i = 0; i<=10; i++){
sum = sum+i
; if(i==5){
goto addition;
}
}
addition:
printf("%d", sum);
return 0;
}
hope it helps!!!!!!!
Similar questions
Social Sciences,
8 months ago
English,
8 months ago
English,
8 months ago
World Languages,
1 year ago
Math,
1 year ago