Solution Review: Initialize a Variable and Overwrite its Value
Let's see the detailed solution review of the challenge given in the previous lesson.
We'll cover the following...
Solution
C++
#include <iostream>using namespace std;int main() {// Initialize variable var to 5000int var = 5000;// Prints value of varcout << "var = " << var << endl;// Overwrite value of var to 1000var = 1000;// Prints new value of varcout << "var = " << var ;}
Explanation
Line No. 7: ...