Explain the break statement - computer programming, Programming Languages

Assignment Help:

Explain the Break Statement - Computer Programming?

The break statement is used as an interrupt to the normal flow of control this statement causes as exit from the switch statement. It can be used within a while, for, do - while or switch statement and the break statement causes the control to come out of the entire loop. A break within a loop must always be protected within an if statement which provides the test to control the exit condition.

char ch;

ch=getchar();

switch(ch)

{

case 'a' :

case 'e' :

case 'i'  :

case 'o'            :

 case 'u'            :{

printf("Vowel");

break;

}

default :{

printf("Not a vowel");        

break;

 }

}

If the input take place to be 'a' or 'e', 'i', 'o', 'u' , the control goes to that particular case and prints "Vowel". By executing the break statement can't will come out of the loop.


Related Discussions:- Explain the break statement - computer programming

Building an e-store website in xhtml, The last exercise of each assignment ...

The last exercise of each assignment will be continuous from assignment to assignment and will have the goal of building an e-store website by the end of the course. For the fir

Script shell to display lines of a file in reverse order, Normal 0 ...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

We need help for build a price quote generator, We need help for build a Pr...

We need help for build a Price Quote Generator I am interested in two things (A) a web based system that will allow a user to enter the parameters of their contests (there are o

Visual Basic 2010 Karate Payments MDI Application, The following are requir...

The following are required for this lesson: Complete the Project "Adding New Payments," which is the Karate Payments that includes the Adding New Payments, Deleting Payments,

Programming (problem solving), develop a pseudocode algorithm to determine ...

develop a pseudocode algorithm to determine the total amount of extra cost changed to the organizers for expenses accurednduring the workshop. the code is to be written for an unde

Linux commans, Corrected Exercise #1: 1. Explain the following unexpected r...

Corrected Exercise #1: 1. Explain the following unexpected result: why did you get the system date command instead of the script? $ whereis date date: /bin/date ... $ echo $PATH

Write the vhdl code for traffic light controller, The schematic of the traf...

The schematic of the traffic light controller is as shown in figure 1. There are three control buttons on the panel: HAZ (Hazard), LT (Left) and RT (Right). Whenever, HAZ is clicke

Java applet, Expertsmind brings you unique solution in java assignments ...

Expertsmind brings you unique solution in java assignments Applet In processing, and the apple company is any little application that works one specific process that works

Provide example of function, Provide Example of Function? An illustrati...

Provide Example of Function? An illustration of a function definition main() { message(); } /* header */ message() { /*bodystarts here*/ printf ("Example for function

Risk - controls and audit tests, Internal Audit has been asked by the State...

Internal Audit has been asked by the State to review the activities of  The Commission on Workforce Development. The Commission was established several years ago by the state legis

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd