As in if we give the condition as:
if ( a [ i ] > largest)
{
largest=a [ i ] ;
}
-
how program knows which one is largest ?
-
And one more quest., is INT_MIN= +infinity?
As in if we give the condition as:
if ( a [ i ] > largest)
{
largest=a [ i ] ;
}
how program knows which one is largest ?
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