you should ask wat's the difference between if..else & switchwhen to use what Was this answer useful? Yes Replyvijju Oct 9th, 2011 The if statement can be used to test conditions so that we can alter the flow of a program. In other words: if a specific statement is true, ex...
float constant cannot be used in the switch as well as in the case. You can not use the variable expression in case. You cannot use the same constant in two different cases. We cannot use the relational expression in case.Difference between switch case and if-else ...
Having seen some similarities between if-else and switch statements, let's look at some similarities between them. In the if-else statement, if the condition inside the if block comes to be false, then the code present in the else block gets executed. While in the switch statement, if no...
What is the difference between local and global variables? True or False: a. The label and the result of the control expression in a switch statement cannot be of type float. b. If a = 0, b = 0, then the result of the expression !(a || b) is true. c. If a = 0 ...
Difference between ( ) { } [ ] and ; Difference between Boxing/Unboxing & Type Casting Difference between Click and Mouse click? Difference between Console.WriteLine and Debug.WriteLine... difference between dispose and setting an object to null Difference between int and byte Difference between Li...
One of the most common curly bracket commands is the "if-then" statement which helps computers process different sets of instructions depending on whether certain conditions are met or not. Other popular commands include “for loop” which allows a programmer to execute loops (repeated execution of...
C # Interop How to add new column and Row C# .NET class getter/setter shorthand C# 10 minute time out in transactionscope since .net 4 upgrade C# Check if Time from textbox is a valid time C# code for get distance between two point using google map C# code for salary calculation C# ...
The major difference between break and continue statements in C language is that a break causes the innermost enclosing loop or switch to be exited immediately. Whereas, the continue statement causes the next iteration of the enclosing for, while, or do loop to begin. The continue statement in...
A bridge connects and filters traffic between two or more network segments at the data link layer, while a switch performs similar functions but with more ports and advanced capabilities, often at a higher efficiency.
What is the main difference between 'when' and 'if'? "When" refers to events that are expected to occur, focusing on time, while "if" introduces conditions that may or may not be met, focusing on possibilities. 6 What role does 'if' play in forming conditional sentences? "If" is cru...