I wouldn't say that this is at all a rate of intelligence, but here is your answer.
Obama was a B student at Occidental, and Columbia. McCain was a C student at Annapolis. You can't really compare the two programs as Obama's major was liberal arts/political science, and McCain's was a highly competitive military school.
The first answer to this question is misleading. Obama graduated from Columbia University (an incredibly competitive ivy league school) at 212 out of over 3800 graduates. He didn't major in liberal arts (as if that is even a major); he majored in political science with a concentration in international relations. He then went on to Harvard Law school where he graduated Magna Cum Laude, the second highest graduate distinction.
McCain graduate from Annapolis ranked 894 out of 899 (fifth from the bottom of his class).
I agree that this is probably not a true indication of intelligence. It goes much more towards work ethic. Plenty of smart people nearly fail out of college due primarily to laziness or a sense of entitlement.
Other people asked questions on similar topics, check out the answers they received:
Other people asked questions on various topics, and are still waiting for answer. Would be great if you can take a sec and answer them