Computer Science, asked by locomaniac, 1 year ago

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 suryanshmishra
1
Goto statement is used to skip or to make unconditional programming
I didn't understand the meaning of c++

suryanshmishra: please mark brainliest or thanks
Answered by Nikhitabisht
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!!!!!!!




Nikhitabisht: thanx 4 marking my answer as brainliest
locomaniac: :)
Similar questions