How program knows which one is largest number?

As in if we give the condition as:
if ( a [ i ] > largest)
{
largest=a [ i ] ;
}

  1. how program knows which one is largest ?

  2. And one more quest., is INT_MIN= +infinity?

The program compares the 2 number…if the conditional statement is true, largest is updated.
INT_MAX is a very large integer…you can assume it as +infinity
INT_MIN is a very small integer and you can assume it as -infinity

1 Like