Variables in C Language

  

Variables in C language

Variables


Variables are the names of memory locations where we store data.

Variables name is any combination of alphabet(a to z or A to Z), digit(0 -9),
and underscore(_).

Valid variable name cannot start with digit.


PROGRAM CONSUMES MEMORY IN RAM



Rules of Variables


1.      A variable name can have letters (both uppercase and lowercase letters), digits and underscore only.

2.      The first letter of a variable should be either a letter or an underscore. However, it is discouraged to start variable name with an underscore. It is because variable name that starts with an underscore can conflict with system name and may cause error.

3.      There is no rule on how long a variable can be. However, only the first 31 characters of a variable are checked by the compiler. So, the first 31 letters of two variables in a program should be different.

C is a strongly typed language. What this means it that, the type of a variable cannot be changed.

If this article is helpful to you then please like share .. thank you...













Comments

Popular posts from this blog

Important Announcements(download all my book free)

O LEVEL- INTERNET TECHNOLOGY & WEB DESIGN

Call by Reference with Pointer in C Language part-4-a