diff options
| author | hybrid <hybrid@hybridlabs.cc> | 2026-08-24 00:48:14 +0300 |
|---|---|---|
| committer | hybrid <hybrid@hybridlabs.cc> | 2026-08-24 00:48:14 +0300 |
| commit | e61e04619d0c9dd4d079532eff3483e234fc8acd (patch) | |
| tree | 561347af88801489977312f4cfd9b33eae75975e /src/chapter1/lesson6 | |
| parent | afd71cacbf324b2898220437c10b4db4228b70ce (diff) | |
| download | learncpp-e61e04619d0c9dd4d079532eff3483e234fc8acd.tar.gz learncpp-e61e04619d0c9dd4d079532eff3483e234fc8acd.tar.bz2 learncpp-e61e04619d0c9dd4d079532eff3483e234fc8acd.zip | |
add: lesson{5,6}, CMakeLists.txt
Diffstat (limited to 'src/chapter1/lesson6')
| -rw-r--r-- | src/chapter1/lesson6/uninit_var.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/chapter1/lesson6/uninit_var.cpp b/src/chapter1/lesson6/uninit_var.cpp new file mode 100644 index 0000000..603b8e0 --- /dev/null +++ b/src/chapter1/lesson6/uninit_var.cpp @@ -0,0 +1,12 @@ +#include <iostream> + +int main() +{ + // define an integer variable named x + int x; // this variable is uninitialized because we haven't given it a value + + // print the value of x to the screen + std::cout << x << '\n'; // who knows what we'll get, because x is uninitialized + + return 0; +} |
