Answer 1, authority 100%
In fact, they are not written in one programming language, but in a mixture:
- most of it is C / C++ (with Visual Studio)
- small part – assembler (masm, what else)
- C # (this was not originally in XP, but for 7 there is already a lot)
- hta (this is the way to build applications using html and scripts).
There is such a tale (I don’t know how true it is, but very interesting) that they originally wanted to write Vista entirely in C # and .NET languages. Like it would be very cool (everything would be very stable and cool). But then they realized that it was simply impossible (at least – there is still no such iron that it would all take off). And they did it the old fashioned way – doped XP.
Answer 2, authority 29%
Different parts in different programming languages, but the main part is in C++, part is assembler.