Computer Science, asked by gglol6894, 8 months ago

what is brake statement​

Answers

Answered by Anonymous
1

ᴡʜᴇɴ ᴀ ʙʀᴇᴀᴋ sᴛᴀᴛᴇᴍᴇɴᴛ ɪs ᴇɴᴄᴏᴜɴᴛᴇʀᴇᴅ ɪɴsɪᴅᴇ ᴀ ʟᴏᴏᴘ, ᴛʜᴇ ʟᴏᴏᴘ ɪs ɪᴍᴍᴇᴅɪᴀᴛᴇʟʏ ᴛᴇʀᴍɪɴᴀᴛᴇᴅ ᴀɴᴅ ᴛʜᴇ ᴘʀᴏɢʀᴀᴍ ᴄᴏɴᴛʀᴏʟ ʀᴇsᴜᴍᴇs ᴀᴛ ᴛʜᴇ ɴᴇxᴛ sᴛᴀᴛᴇᴍᴇɴᴛ ғᴏʟʟᴏᴡɪɴɢ ᴛʜᴇ ʟᴏᴏᴘ. ɪᴛ ᴄᴀɴ ʙᴇ ᴜsᴇᴅ ᴛᴏ ᴛᴇʀᴍɪɴᴀᴛᴇ ᴀ ᴄᴀsᴇ ɪɴ ᴛʜᴇ sᴡɪᴛᴄʜ sᴛᴀᴛᴇᴍᴇɴᴛ (ᴄᴏᴠᴇʀᴇᴅ ɪɴ ᴛʜᴇ ɴᴇxᴛ ᴄʜᴀᴘᴛᴇʀ).

Answered by Lovelyfriend
3

When a break statement is encountered inside a loop, the loop is immediately terminated and the program control resumes at the next statement following the loop. It can be used to terminate a case in the switch statement.

Similar questions