Processor affinity is also called cache affinity and even sometimes regarded as processor pinning. It is a concept that allows a particular thread/process/program to run on and only on a specified core (processor) or set of cores. Even if the process is preempted, it will have to wait until it is restarted or continued by the core that started it in the first place. No other core(s) aside the specified one(s) will take on the process.
Processor/Cache affinity connects and disconnects a certain process from a CPU in such a way that only the specified CPU, rather than another CPU, will always take on that process.
An advantage of this is that there is efficient optimization of cache. Also, if many processes are using or sharing the same data, it is just logical to attach all of those to the same processor.
It captures a single moment that one might not see with a naked eye. It shows the beauty and the essence of simple things in one exact moment. And it allows the viewer to take more time to reflect on what is captured and really find meaning within it.
Here scanf is represented by stdin and we are using that scanner object to read the string value from user.The value which we read are printed in a new line using printf .The format specifier %s in printf is replaced by name variable