Recently I came across flag variables, but I have no idea what they do.
I am little unsure about when to use a flag variable and how to go about it.
I Google
A flag is a variable used to have some value until some condition becomes true,then we change it to false and print the output (Initially flag considered as true)