Search:

Type: Posts; User: rbz

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    2,202

    K&R 3-3 expand function

    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...
  2. Thread: Expansion

    by rbz
    Replies
    1
    Views
    1,332

    Expansion

    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...
  3. Replies
    4
    Views
    1,069

    EDIT: Ok so I think I understand it. A = 10 in...

    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...
  4. Replies
    4
    Views
    1,069

    hex to dec question

    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...
Results 1 to 4 of 4