Tag Archives: Value

TEA BREAK WITH C++: VARIABLES

Since we learned basic input function at programming with C++, we need to talk a little more about the variables. 

Variables are simply naming some data location in your pc. With variables you can store a value. 

Variables can be global, local or block based. Actually, you can use the same variable name in these locations at the same time. 

  1. #include <iostream>
  2. using namespace std;
  3. int sameVar=1; //defining a global variable at header location
  4. int main(){
  5.     int sameVar=2;    //defining a local variable inside int main
  6.     cout<<“local variable:”<<sameVar; //printing a local variable in int main 
  7.     {
  8.     int sameVar=3; //here we define a variable in any block. 
  9.     cout<<“block variable:”<<sameVar; //printing the block variable
  10. }
  11. //reaching a global variable inside program
  12. cout<<“global variable:”<<::sameVar; //we print global variable in a program
  13. }

 Output;

Here the most important thing we need to talk is the 

variable = value logic. 

Always variable is on the left and the value is on the right of the equivalent sign. 

EE99 – CAPACITOR VALUE READING TABLE

Capacitor manufacturers generally give the value of capacitor on capacitor but, in some cases there may be not enough space. In that case, they use simple notation. If it is 2 digits number then no issues. You can say the value seen is the value on capacitor. But if it has 3 digits then the first two digit you take as is and remaining last digit is the number of zeros following that first two digits. See table below;

Continue reading EE99 – CAPACITOR VALUE READING TABLE