0

Int a,b=12; cout <<a,b; // output =8. Why???

18th Jul 2018, 9:53 AM
Nguyễn Quang Huy
Nguyễn Quang Huy - avatar
4 Antworten
+ 3
If the whole thing is int a, b = 12; cout << a, b; then, the output would be the a's value which is some garbage value.
18th Jul 2018, 10:14 AM
Babak
Babak - avatar
+ 3
Nguyễn Quang Huy Garbage values refer to some preoccupied and meaningless values in memory which left over from other program's activities. Since you weren't initialized the a variable, its content is garbage.
18th Jul 2018, 10:22 AM
Babak
Babak - avatar
0
garbage value. what is this
18th Jul 2018, 10:16 AM
Nguyễn Quang Huy
Nguyễn Quang Huy - avatar
0
ok. thanks
18th Jul 2018, 10:25 AM
Nguyễn Quang Huy
Nguyễn Quang Huy - avatar