What is a flag variable?

前端 未结 4 1579
逝去的感伤
逝去的感伤 2020-12-01 14:56

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

4条回答
  •  孤城傲影
    2020-12-01 15:34

    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)

提交回复
热议问题