any solution to convert given char*(number) to required unsigned char*(hex of number)

Discussion in 'Meet and Greet' started by passionpatel, Jul 6, 2008.

Thread Status:
Not open for further replies.
  1. passionpatel

    passionpatel New Member

    Joined:
    Jul 6, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Given For e.g,
    char input[] = "10011210582553796";

    now Hexadecimal of 10011210582553796 is 2391249A8B74C4.

    So output unsigned char* should have value,
    unsigned char output[8] = {0x00,0x23,0x91,0x24,0x9A,0x8B,0x74,0xC4};

    can anyone give a solution to convert given input char* to output char* with above mentioned requirement.

    code should run on platform, for which __int64/signed long long is not supported.

    Thanx in advance...
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,341
    Likes Received:
    378
    Trophy Points:
    83
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice