同一进程的线程可以在多核处理器的不同内核上运行。假设我们有一个多处理器系统(不是多核)。同一进程的两个线程可以同时在不同的处理器上运行吗?
int main()
{
int x[3]={4,5,6};
int *p=x;
p +1=p;/*compiler shows error saying
lvalue required as left
operand of assignment*/
cout<<p 1;
getch();
}
Run Code Online (Sandbox Code Playgroud)