Local Variables And Global Variables

Hello Guys!!! Welcome back!!

We are studying of c++ programming. we studied common topics between C and C++. but in both languages many basic concepts is same and some functions add in C++ and formate is diffrents. so here we go!!!


What is Variables?
      Which value does change. Computer has lots of memory cells to store the vales. but computer can not store the values directly. so we have to assume a variable which can store the value.


Here is an example of variable that value doesnot change. In fig1), computer stores the value 10 with variable X because X is a memory cell name which can store the value in the computer memory.
in fig 2), variable is same but value is diffrent so we can say that variable is an value does change.
We declares the variable in the program. here is two types of variables.
1) Local Varable
2) Globle Variable

    Local Variables:
Variables That are declared inside of the functions.



Globle Variables:
Variables that are declared outside of the functions.


In C language, we use printf for output and scanf for input function.
In this language, we will use cout for output function and cin for input function.
Thats it!!!!
Thank You for watching my post. My next post will be more exciting.
UNTILL THEN BYE BYE!!!!!






Twitter: @NewAgeInformers



Instagram: @new_age_informers

Youtube: CLICK HERE!!!!



Comments