PROGRAMMING PIC MICROCONTROLLERS IN C:VARIABLES

VARIABLES

In C, a variable must be declared before it can be used in a program. Variables are usually declared at the beginning of any block of code. Every variable has a name and a value – the name identifies the variable and the value stores data. There is a rule governing what a variable name can be. Every variable name in C must start with a letter, and the rest of the name can consist of letters, numbers and underscore characters. In C, lower-case and upper-case variable names are different. Also, keywords such as if, while and switch cannot be used as variable names.

Examples of valid variable names are:

Programming PIC Microcontrollers in C-0106

Leave a comment

Your email address will not be published. Required fields are marked *