Be notified when an answer is posted
No lol it’s not
A local variable is a variable that can only be called on by the module. Where as a global variable can be called upon by any module. Only statements made inside the same module can call on a local variable.
If you're talking about statements, most statements are about either initializing a variable, doing some operation in or on a variable, or a flow statement such as if or while.
Usually, the name of the variable can be most anything. This type of variable is called a LOGICAL variable.
A local variable
Boolean.
A variable is an entity that may change its value. In a program, the result of the processing statements are stored in the computer's memory.
The program's statements, just like any other variable.
boolean
The program's statements, just like any other variable.
Only one variable is changed at a time
Both can be used as condition based statements but their syntax is different. Switch is used when a variable is to be compared with different constants.Switch statement has the syntax as : switch(choice) { case 1: statements break; case 2': statements break; . . case 'n': statements break; default: statements break; } where choice is an integer or character variable. if else statements take the form: if(cond1) { statements; } else if(cond2) { statements; } . . else { statements; } where cond1 and cond 2 areany valid arithmetic, logical or relational expression.