void main()
            {
                unsigned int x=500;
                int y=-5;
                if(x>y)
                  printf("hello");
                else
                  printf("hi");
                 getch();
            }                

This is homework. What was your answer to the question? It has to do with how signed and unsigned types interact.

Get the answer yourself..Let me tell you something about this.Whenever there is a comparison between unsigned integer and signed integer then signed integer gets converted into unsigned integer.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.