a is a character array which contains integers 09
Help please
This question is marked "community wiki".
asked 09 Dec '18, 21:31

1) Here a[i] will be stored and used as its ASCII value. For example, '0' will have ASCII value of character '0', i.e. 48. Similarly, a[i] will be in range of 4857. Hence, a[i]'0' will be an integer value between 09. 2) Here a[i] is simply compared with a character '9'. Again, it will be compared with respect to their ASCII values. So, here a character is not compared to an integer. It is an ASCII value compared to another ASCII value. If you want to compare a[i] with integer value of '9', you can use a[i]>57. answered 10 Dec '18, 23:31
