I have two options before me (in my budget): Quad core 1.6 GHz(Intel i5 8th gen 8250u) vs Dual core 2.5 GHz(Intel i5 7th gen 7200u) powered CPU. I use Microsoft visual studio,pycharm, and few other heavy IDEs for programming. And I don't know which is the best choice of laptop to buy to work efficiently for me,I mean no system hanging,no blue screens and stuff like that. Thanks in Advance.
Just the clock frequency and the number of cores are not enough to characterize a processor. It would be useful if you could share the exact model of the processors you have in mind. But, I am guessing you are asking for a comparison between i5-8250u (Base frequency: 1.6GHz Number of physical Cores:4) and i5-7200u( Base frequency:2.5GHz Number of physical core:2) as comparison between these two models is pretty popular in the mid-range laptop segment.
If so, note that the i5-8250 is a eighth generation intel processor whereas i5-7200u is a 7th generation intel processor. Also note that the i5-8250 has max turbo frequency of 3.4 GHz against the 3.1GHz of the 7200u and a 6MB of L3 cache against a 3MB of cache in 7200u. Hence the 8250u is in everyway a better and efficient processor than the 7200u.
The lower 1.6GHz that you are worrying about is just the base clock rate i.e, the clock rate that all cores can simultaneously operate at under moderate load. Under heavy load, a single core of 8250u can boost its clock rate to 3.4GHz for better performance. The lower base clock rate is actually to improve power efficiency.