I am an undergraduate student in Computer Engineering and I would like to do a Ph.D. at a well reputed university. I am facing a problem because I took some borderline pass grades in a few courses (3 of them) and I might want to retake them. This courses though are not that much relevant to the area that I currently work in (for example they might be some user interface design classes whereas my focus is on parallel computing).
I would like to ask how much do these grades matter for my applications for a Ph.D. in a reputed university (like Carnegie Mellon Univeristy (CMU) in Computer Science, but not restricted to that). And how much does these grades matter if I get into an M.Sc. course in a highly reputable university.
To be more concrete, will these grades matter if I want to continue my studies towards a Ph.D. at CMU. And how much more or less do they matter if I will be on an M.Sc. at ETH Zurich (or a similar university, where I can do really good research) when I will apply to CMU. (This is just a random example)