C - Scope Rules

A scope in any programming is a region of the program where a defined variable can have its existence and beyond that variable can not be accessed. There are three places where variables can be declared in C programming language:
  1. Inside a function or a block which is called local variables,
  2. Outside of all functions which is called global variables.
  3. In the definition of function parameters which is called formal parameters.
Let us explain what are local and global variables and formal parameters.

Read more...


Post a Comment