about \n in C/C++

if i write like this :
cout << "]\n";

it must be show in view like this:

0  cout << "]\n";

not like this :

0  cout << "]
1   ";

thanks ;)