Consider the following code snippet\n\n unsigned int i=10;\n int j= - 2; // minus 2\n if(i>j)\n cout<<"i is greater";\n else\n cout<<"j is greater";\n\nSince i is unsigned , j is greater . I know why , but vaguely . Can\nsomeone please explain the mechanics behind it . Is the unsigned int\nconverted to signed or is it vice-versa . Also , the same rules would\napply to char as well , right ?