Veriable Declare in C++ - By E3 school

 In this tutorial learn how to declare variables in c++. Complete learn this topic. Some Questions are given below. 

Question :

  1. How to declare variables in CPP?
  2. Sntaxy Variable in CPP?

Easy To Learn. Easy To Understand.

how to declare variable

  1. How to Declare Variable in CPP?
A variable declaration has its which means on the time of compilation handiest, compiler wishes actual variable definition on the time of linking of the program. ... Though you can declare variable more than one instance in your C++ program, it could be described handiest as soon as in a file, a function, or a block of code.
  1. Sntaxy Variable Declare in CPP?
  2. Syntax
    Data_type Variable = Value ;
     Explain Sntaxy 
    Data_Type:
    For Example:
    1. Int (Integer)
    2. Char
    3. Float
    4. Double
    5. Bool

Variable :

Data_type  Variable = Value;
  1. Variable is the name of a variable
  2. For Example
  3. Such as x or myName, A, B, or different name

Value:

Data_type  Variable = Value;
Any Variable Assign Value 
For Example
int X= 20;
  1. 20 is a value assign x
  2. For Example
  3. X= 30; X Assign a value 30 
  4. Y=50; Y Assign a Value 50 
  5. 20 
  6. 40 
  7. 60
  8. 70
  9. Are different Values.




Post a Comment

Virtually nothing is impossible in this world if you just put your mind to it and maintain a
positive attitude.

أحدث أقدم