scopes in c++ along with local, global variables





This video tutorial explains the variable scopes in c++ along with the global and local variables.
You will learn what is scope, what are the variable scopes available in c++, what is local scope, what is global scope, what is block scope, what are local variables and what is their scope, what are global variables and what is their scope with example in detail.

source code for this tutorial

#include <iostream>

using namespace std;

void display();
int main()
{
    display();
    return 0;
}

void display(){
    int x;
    cout << x ;
}