I am going to be building a PC and i have chosen all components, but the CPU. I have stopped on i7-6700k and i7-6800k. I know that for gaming the i7-6700k will have better performance, but i am going to be using my PC for programming/developing applications on VM (Windows 10 with Visual Studio, Eclipse, etc.). So, is the i7-6700k with its 4 cores (2 on the Host and 2 on the Guest) the enough or the i7-6800k with its 6 cores (2 on the Host and 4 on the Guest or 3 on the Host and 3 on the Guest) the better choice? I am just not sure that the i7-6700k will provide me a smooth experience like i am not on a VM.
If you're just running one VM, then the i7-6700K will be just fine for you. While it only has four cores, those cores have hyperthreading, which means that as far as your OS and the VM are concerned, your computer would have eight cores. This actually does improve performance. I'm not going to get into the black magic that makes it all work, but for your purposes the Intel Core i7-6700K will work fine.
For that matter, you can really step it down to something as low as an FX-8350 and not get noticeable performance differences in most games or VM situations, but I would not recommend doing so unless you were on a strict budget.