This Video is our first look at variables and how to declare and initialize variables. We'll be going over identifier naming rules and the overall syntax on how to appropriately declare variables. Then we will do a practice program at the end
Names for variables, functions, macros, and other entities are called identifiers
An identifier may contain letters, digits, and underscores, but must begin with a letter or underscore
C is case-sensitive: it distinguishes between upper-case and lower-case letters in identifiers.
1. only lower-case letters in identifiers, with underscores inserted for legibility:
symbol_table current_page name_and_address•
2. Use an upper-case letter to begin each word within an identifier:
symbolTable currentPage nameAndAddress
We use variables to store data during program execution
You need to declare a variable (need to create memory space) before you can use a variable
Every variable must have a type.
C has a wide variety of types, but today we will focus on the int and double types
int data types are used for integer values (whole numbers)
double data type are used for values that require decimal places
We use variables to store data during program execution
You need to declare a variable (need to create memory space) before you can use a variable
Every variable must have a type.
C has a wide variety of types, but today we will focus on the int and double types
int data types are used for integer values (whole numbers)
double data type are used for values that require decimal places
Initial value of a variable may be included in its declaration:
int height = 8;
Any number of variables can be initialized in the same declaration:
int height = 8, length = 12, width = 10;
Each variable requires its own initializer.int height, length, width = 10;
/* initializes only width */
On this page of the site you can watch the video online 2. Data Types, Variables, Identifiers with a duration of hours minute second in good quality, which was uploaded by the user Everything_Programming 09 August 2020, share the link with friends and acquaintances, this video has already been watched 114 times on youtube and it was liked by 3 viewers. Enjoy your viewing!