定义了一维数组 int a[10],在一行中输出这个数组的正确方法是( )
for (int i = 0; i < 10; i++)
{ cout << a[i] << " " << endl; }
for (int i = 0; i < 10; i++)
{ cout << a[i] << " "; }
for (int i = 1; i <= 10; i++)
{ cout << a(i) << endl; }
for (int i = 0; i <= 10; i++)
{ cout << a[i] << ' '; }