Загрузка...

Rules for constructing variables in C | C Programming tutorial for beginners

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

Видео Rules for constructing variables in C | C Programming tutorial for beginners канала Aptuts
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки