Scope Rules

Scope rules in C define the visibility and accessibility of variables and identifiers within different parts of the program. These rules also apply to variables declared within functions. 

Local Scope: Variables declared inside a function have local scope, meaning they are only accessible within that function. They are not visible outside the function in which they are declared.

void myFunction() {
    int localVar; // Local variable
    // localVar is only accessible within myFunction
}

Global Scope: Variables declared outside of any function, usually at the top of the file, have global scope. They are accessible from any function within the same file (translation unit) by default. 

int globalVar; // Global variable
void myFunction() {
    // globalVar is accessible within myFunction
}