2. Data Types, Variables, Identifiers

Publicado el: 09 agosto 2020
en el canal de: Everything_Programming
114
3

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 */


En esta página del sitio puede ver el video en línea 2. Data Types, Variables, Identifiers de Duración hora minuto segunda en buena calidad , que subió el usuario Everything_Programming 09 agosto 2020, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 114 veces y le gustó 3 a los espectadores. Disfruta viendo!