--- In [email protected], Uday Oberio <[EMAIL PROTECTED]> wrote:
>
> hello everyone 
>   i m very new in this so please help.
>   thanx in advace,,,,
>    
>   my problem is this : - 
>    
>   #include<stdio.h>
> #include<conio.h>
> void main()
> {
> int a=-5;
> unsigned int r=2000;
> if(a>r)
> printf( " a is greater than r ");
> else
> printf(" r is greater than a");
> }
> 
>    
> the output is  = a is greater than r  
>   because:

range of int is -31268 to 31267,these are in cyclic form 31267+1
become -31268.and range of unsigned int 0 to 62535 and if we take the
value of -5 as an unsigned int then it become 62530 which is greater
than 20000.
> 
>        



Reply via email to