Skip to main content

Posts

Showing posts with the label data types

Variables and data types

 Variables and data types     A variable is an identifier that does not store location. It use to store data values. Unlike constant that remain unchange during the execution of program, but a variable may take different value or can change value different times during the execution of program.     A variable name can be chosen by programmer in meaningful way so it can reflect what it represent in the program. Some example are as follows:     average     height     total_height     classStrength     Variable name may consist of alphabets, digits, the underscore ( _ ) and dollar ( $ ) characters.  It has some conditions those are as follows:     They must not begin/start with digit.     Uppercase and lower case are distinct. That means TOTAL is not same as total .     It should not be a keyword.     White space is not allowed.     Variable name can be any len...