In this lecture, I will talk about rules for constructing variables in C programming. I will go through list of valid and in-valid variables.
Variables in C are entities whose value keeps on changing throughout the program execution. As we all know, data is stored in the memory of the computer. Actually, data is not stored in the variable. A variable is the name given to the memory location. A variable name is an entity that points to a particular memory location.
Rules for constructing variables in C
A Variable name consists of any combination of alphabets, digits and underscores. Some compiler allows variable names whole length could be up to 247 characters. Still it would be safer to stick to the rule of 31 characters. Please avoid creating long variable name as it adds to your typing effort
The first character of the variable name must either be alphabet or underscore. It should not start with the digit
No commas and blanks are allowed in the variable name
No special symbols other than underscore are allowed in the variable name
Consider subscribing to this channel to get latest updates on new videos and online C programming course.
Interested in learning C programming language? Visit my comprehensive C course - https://www.aptuts.com/c-programming
#VariablesInC #rulesForConstructingVariablesInC
On this page of the site you can watch the video online Rules for constructing variables in C | C Programming tutorial for beginners with a duration of hours minute second in good quality, which was uploaded by the user Aptuts 15 August 2020, share the link with friends and acquaintances, this video has already been watched 1,016 times on youtube and it was liked by 15 viewers. Enjoy your viewing!