I need some help with this program. If you can say me what exactly means those notation: 'a', 'f', and what happens in every major sequence of every function. This program convert a string to int and hexadecimal numbers to int.
Thanks.
This c[i]>='a' && c[i]<='f'
is a combination of two conditions: c[i] >= 'a' and c[i] <= 'f'
The && (logical and) operator means that the complete condition is true only if both of the conditions are true, that is, it is testing that c[i] is somewhere in the range 'a' to 'f' inclusive.
Look at each term in this expression: nr + (c[i]-'0') * pow
the part in parentheses is evaluated first, then the multiplication by pow and finally the addition. Lastly, the end result is assigned to nr.