Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be...
Type: Posts; User: rbz
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be...
Hi, I'm working through the problems in K&R and I'm having difficulty with a particular one.
/*Write a function expand(s1,s2) that expands shorthand notations like a-z in the
string s1 into the...
EDIT: Ok so I think I understand it. A = 10 in hex, B = 11 ...F = 16. The reason the numeric value of A is being substracted and then 10 added to it is so that the number can be repesented by it's...
int htoi(char s[])
{
int i = 0; /* Iterate over s */
int n = 0; /* Built up number */
/* Remove "0x" or "0X" */
if ( s[0] == '0' && s[1] == 'x' || s[1] == 'X' )
i...