IndiaBIX.com
Arithmetic Aptitude Data Interpretation
Logical Reasoning Verbal Reasoning Non Verbal Reasoning
General Knowledge
Sudoku Number puzzles Missing letters puzzles Logical puzzles Playing cards puzzles Clock puzzles
C Programming C++ Programming C# Programming Java Programming
Microbiology Biochemistry Biotechnology Biochemical Engineering
Civil Engineering Mechanical Engineering Chemical Engineering Networking Database Questions Computer Science Basic Electronics Digital Electronics Electronic Devices Circuit Simulation Electrical Enigneering Engineering Mechanics Technical Drawing
Placement Papers Group Disucssion HR Interview Technical Interview Body Language
Aptitude Test Verbal Ability Test Verbal Reasoning Test Logical Reasoning Test C Programming Test Java Programming Test Data Interpretation Test General Knowledge Test
Data Structures Operating Systems Networking DATABASE Database Basics SQL Server Basics SQL Server Advanced SQL Server 2008 JAVA Core Java Java Basics Advanced Java UNIX Unix File Management Unix Memory Management Unix Process Managemnt C Interview Questions The C Language Basics .NET Interview Questions .NET Framework ADO.NET ASP.NET Software Testing

Computer Science - Object Oriented Programming Using C++ - Discussion


Read more:

"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe."
- Albert Einstein
5. 

The use of the break statement in a switch statement is

[A]. optional
[B]. compulsory
[C]. not allowed. It gives an error message
[D]. to check an error
[E]. None of the above

Answer: Option A

Explanation:

No answer description available for this question.


Sharda said: (Tue, Aug 9, 2011 07:04:05 AM)    
 
How can it b optional? please let me know.

Sonu said: (Sun, Aug 21, 2011 07:14:48 PM)    
 
If you not write it, it will ok, but all statements from other cases also get executed.

Manisha said: (Tue, Mar 20, 2012 09:13:02 AM)    
 
Actually it's compulsory for proper output if we not written it then we not got proper output.

Mrt said: (Sat, Sep 15, 2012 03:38:57 PM)    
 
I though this is compulsory. because we never use break option then. it execute all statement and if i use default option the it always execut and may be give wrong result ...!

Wasif said: (Thu, Nov 1, 2012 02:00:05 PM)    
 
Its not compulsory becouse when we want to prform same task for multiple cases in single itteration at that time there is no need use break statement for each case.

Eg:.

As + and - having same priority & * and / has same priority we can write.

Switch (operator).
Case +:.
Case -:.
Return 1;.
Break;.
Case *:.
Case /:.
Return 2;.
Break;.

Write your comments here:
Name *:     Email:


© 2008-2013 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy

Contact us: info@indiabix.com     Follow us on twitter!