0
What is the diffrences between myvariable and myVariable
I don't no the diffrences
5 ответов
+ 2
myvariable and myVariable are two different variables when case sensitivity is involved that is myvariable is written in lower case while myVariable has an uppercase 'V'. When case sensitivity is not involved myvariable = myVariable
+ 1
Case sensitivity just tells the program to differentiate between lowercase and uppercase letters such as c and C. So myvariable and myVariable can hold two separate data points.
example:
int myvariable = 3;
int myVariable = 2;
cout << myvariable << endl;
cout << myVariable << endl;
outputs
3
2
That said, it is common practice for coders to use myVariable instead of myvariable for visual attractiveness. When a variable is made up of to words such as myVariable you capitalize the first letter of the second word wwhile leaving the first letter of the first word lowercase. While it's not necessary it is the common practice.
0
what is case sensitivity
0
Case sensitivity is distinguishing between uppercase letters ABCDEF... Z and lowercase letters abcdef....z
When case sensitivity is on.
myvariable = myvariable (EQUAL)
And
myvariable != myVariable (NOT EQUAL)
0
Case sensitivity is when a compiler distinguishes lowercase from uppercase letters. For example:
Say case sensitivity is on. myVariable holds a different value than myvariable because the V is uppercase in one but lowercase in the other. If case sensitivity is off, the compiler doesn't make a distinction between V and v.