i'm a student of IT and i have some general academic knownledge of C. Recently i started to study C++ but i'm stuck to this strange thing i that found now about assignments.
1^ program:
int main() {
int x;
cout << x;
return 0;
}
x is printed in stdout as 0.
2^ program:
int main() {
int x, y=2;
cout << x << endl << y;
return 0;
}
x is printed in stdout as 1.
Anyone can explain me, please?
Thanks, Gabriele.