variables

No Comments

What are C Tokens?

C programs contains many elements which are identified by the compiler as Tokens. Tokens can be categorized as 1. Keywords2. Variables3. Constants 4. Special characters 5. Operators C Token example program: int main() { int x, y, sum; x = 5, y = 10; sum = x + y; Printf (“Sum = %d \n”, sum); […]

No Comments

What is a global variable?

variables that are known throughout the program and may be used by any piece of code is called a global variable. Also, they will hold their value throughout the program’s execution. Global variables can be created by declaring them outside of any function. Global variables are helpful when many functions in the program use the […]

No Comments

What is a local variable?

Variables that are declared inside a function are called local variables. Local variables can be used only by statements that are inside the block in which the variables are declared. In other words, local variables are not known outside their own code block. A block of code begins with an opening curly brace and terminates […]