let's say we have a Single core, 2 cores and a 8 cores processors.

Do people have to write codes sepearatly to take advantages of multiple cores and single core?

I have seen same software runs on t 2 cores and a 4 cores prcessors. how could this happen?

The number of cores available is largely in irrelevance to an applications programmer. When it comes time for an application to run, the operating system will decide which core it gets to run on.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.