Unsigned long into char array











up vote
4
down vote

favorite












Here is an example of my code :



/* Standard Linux headers */


/* --------------------------------------------------------------------------
Calculates the CRYPTO
-------------------------------------------------------------------------- */
unsigned long CalculateCRYPTO(
unsigned long ulCount, /* Number of bytes in the data block */
unsigned char *ucBuffer ) /*Data block*/
{
unsigned long ulCRYPTO = 0;
//fonction that i have not coded ...
return( ulCRYPTO );

}


int main (void)
{

/*Variables and socket programming*/

//this is my datablock must be in hexa AA 35 07 (will chnage size and data but for now it's hardcoded)
unsigned char datablock[3];
memset(datablock, '' ,sizeof(datablock));
datablock[0]=0xaa;
datablock[1]=0x35;
datablock[2]=0x07;

unsigned long CRYPTO;
CRYPTO=CalculateCRYPTO(sizeof(datablock),datablock); //calculate crypto depending of datablocks
printf("CRYPTO = 0x%08x n", CRYPTO); //prints me 0xe8ba8fa3 that is what i want

/*Creating the final command*/
//(will chnage size and data but for now it's fixed)
unsigned char cmd_final_hex[7]; //this needs to be DATABLOCKS+CRYPTO
//in hexa AA 35 07 concatenated to inverted CRYPTO so ... A3 8F BA E8 => must be AA 35 07 A3 8F BA E8
memset(cmd_final_hex, '' ,sizeof(cmd_final_hex)); //Make sure cmd final is at 0
memcpy(cmd_final_hex, datablock, sizeof(datablock)); //cmd at datablock + 000
// while loop prints me what i want so cmd_final_hex=AA 35 07 00 00 ...

//Now i want to concatenate so my idea is to use memcpy and not strcat :
memcpy(&cmd_final_hex[sizeof(datablock)], &CRYPTO, 4);

//and a print gives me AA 35 07 A3 8F BA E8 which is exactly what i want but why do i have to use "&CRYPTO" and not "CRYPTO" in my memcpy. !!!

return 0;


}


My question is, why does this last memcpy works ? i would expect to put CRYPTO and not &CRYPTO in arguments... For me, CRYPTO is the value i want so 0xe8ba8fa3 and &CRYPTO the address. And for me, CRYPTO is not a pointer, so why i need to use memcpy with &CRYPTO to make it works ?



By the way, my code may be pure disaster, i'm a beginner. Do not hesitate to correct me !



Thank you !










share|improve this question


















  • 2




    great job on creating a Minimal, Complete, and Verifiable example! I feel however that it can be improved. There are still parts of it that are irrelevant to your issue. Here's how I think a better MCVE could look: pastebin.com/3QcR7bLi
    – bolov
    Nov 20 at 12:47















up vote
4
down vote

favorite












Here is an example of my code :



/* Standard Linux headers */


/* --------------------------------------------------------------------------
Calculates the CRYPTO
-------------------------------------------------------------------------- */
unsigned long CalculateCRYPTO(
unsigned long ulCount, /* Number of bytes in the data block */
unsigned char *ucBuffer ) /*Data block*/
{
unsigned long ulCRYPTO = 0;
//fonction that i have not coded ...
return( ulCRYPTO );

}


int main (void)
{

/*Variables and socket programming*/

//this is my datablock must be in hexa AA 35 07 (will chnage size and data but for now it's hardcoded)
unsigned char datablock[3];
memset(datablock, '' ,sizeof(datablock));
datablock[0]=0xaa;
datablock[1]=0x35;
datablock[2]=0x07;

unsigned long CRYPTO;
CRYPTO=CalculateCRYPTO(sizeof(datablock),datablock); //calculate crypto depending of datablocks
printf("CRYPTO = 0x%08x n", CRYPTO); //prints me 0xe8ba8fa3 that is what i want

/*Creating the final command*/
//(will chnage size and data but for now it's fixed)
unsigned char cmd_final_hex[7]; //this needs to be DATABLOCKS+CRYPTO
//in hexa AA 35 07 concatenated to inverted CRYPTO so ... A3 8F BA E8 => must be AA 35 07 A3 8F BA E8
memset(cmd_final_hex, '' ,sizeof(cmd_final_hex)); //Make sure cmd final is at 0
memcpy(cmd_final_hex, datablock, sizeof(datablock)); //cmd at datablock + 000
// while loop prints me what i want so cmd_final_hex=AA 35 07 00 00 ...

//Now i want to concatenate so my idea is to use memcpy and not strcat :
memcpy(&cmd_final_hex[sizeof(datablock)], &CRYPTO, 4);

//and a print gives me AA 35 07 A3 8F BA E8 which is exactly what i want but why do i have to use "&CRYPTO" and not "CRYPTO" in my memcpy. !!!

return 0;


}


My question is, why does this last memcpy works ? i would expect to put CRYPTO and not &CRYPTO in arguments... For me, CRYPTO is the value i want so 0xe8ba8fa3 and &CRYPTO the address. And for me, CRYPTO is not a pointer, so why i need to use memcpy with &CRYPTO to make it works ?



By the way, my code may be pure disaster, i'm a beginner. Do not hesitate to correct me !



Thank you !










share|improve this question


















  • 2




    great job on creating a Minimal, Complete, and Verifiable example! I feel however that it can be improved. There are still parts of it that are irrelevant to your issue. Here's how I think a better MCVE could look: pastebin.com/3QcR7bLi
    – bolov
    Nov 20 at 12:47













up vote
4
down vote

favorite









up vote
4
down vote

favorite











Here is an example of my code :



/* Standard Linux headers */


/* --------------------------------------------------------------------------
Calculates the CRYPTO
-------------------------------------------------------------------------- */
unsigned long CalculateCRYPTO(
unsigned long ulCount, /* Number of bytes in the data block */
unsigned char *ucBuffer ) /*Data block*/
{
unsigned long ulCRYPTO = 0;
//fonction that i have not coded ...
return( ulCRYPTO );

}


int main (void)
{

/*Variables and socket programming*/

//this is my datablock must be in hexa AA 35 07 (will chnage size and data but for now it's hardcoded)
unsigned char datablock[3];
memset(datablock, '' ,sizeof(datablock));
datablock[0]=0xaa;
datablock[1]=0x35;
datablock[2]=0x07;

unsigned long CRYPTO;
CRYPTO=CalculateCRYPTO(sizeof(datablock),datablock); //calculate crypto depending of datablocks
printf("CRYPTO = 0x%08x n", CRYPTO); //prints me 0xe8ba8fa3 that is what i want

/*Creating the final command*/
//(will chnage size and data but for now it's fixed)
unsigned char cmd_final_hex[7]; //this needs to be DATABLOCKS+CRYPTO
//in hexa AA 35 07 concatenated to inverted CRYPTO so ... A3 8F BA E8 => must be AA 35 07 A3 8F BA E8
memset(cmd_final_hex, '' ,sizeof(cmd_final_hex)); //Make sure cmd final is at 0
memcpy(cmd_final_hex, datablock, sizeof(datablock)); //cmd at datablock + 000
// while loop prints me what i want so cmd_final_hex=AA 35 07 00 00 ...

//Now i want to concatenate so my idea is to use memcpy and not strcat :
memcpy(&cmd_final_hex[sizeof(datablock)], &CRYPTO, 4);

//and a print gives me AA 35 07 A3 8F BA E8 which is exactly what i want but why do i have to use "&CRYPTO" and not "CRYPTO" in my memcpy. !!!

return 0;


}


My question is, why does this last memcpy works ? i would expect to put CRYPTO and not &CRYPTO in arguments... For me, CRYPTO is the value i want so 0xe8ba8fa3 and &CRYPTO the address. And for me, CRYPTO is not a pointer, so why i need to use memcpy with &CRYPTO to make it works ?



By the way, my code may be pure disaster, i'm a beginner. Do not hesitate to correct me !



Thank you !










share|improve this question













Here is an example of my code :



/* Standard Linux headers */


/* --------------------------------------------------------------------------
Calculates the CRYPTO
-------------------------------------------------------------------------- */
unsigned long CalculateCRYPTO(
unsigned long ulCount, /* Number of bytes in the data block */
unsigned char *ucBuffer ) /*Data block*/
{
unsigned long ulCRYPTO = 0;
//fonction that i have not coded ...
return( ulCRYPTO );

}


int main (void)
{

/*Variables and socket programming*/

//this is my datablock must be in hexa AA 35 07 (will chnage size and data but for now it's hardcoded)
unsigned char datablock[3];
memset(datablock, '' ,sizeof(datablock));
datablock[0]=0xaa;
datablock[1]=0x35;
datablock[2]=0x07;

unsigned long CRYPTO;
CRYPTO=CalculateCRYPTO(sizeof(datablock),datablock); //calculate crypto depending of datablocks
printf("CRYPTO = 0x%08x n", CRYPTO); //prints me 0xe8ba8fa3 that is what i want

/*Creating the final command*/
//(will chnage size and data but for now it's fixed)
unsigned char cmd_final_hex[7]; //this needs to be DATABLOCKS+CRYPTO
//in hexa AA 35 07 concatenated to inverted CRYPTO so ... A3 8F BA E8 => must be AA 35 07 A3 8F BA E8
memset(cmd_final_hex, '' ,sizeof(cmd_final_hex)); //Make sure cmd final is at 0
memcpy(cmd_final_hex, datablock, sizeof(datablock)); //cmd at datablock + 000
// while loop prints me what i want so cmd_final_hex=AA 35 07 00 00 ...

//Now i want to concatenate so my idea is to use memcpy and not strcat :
memcpy(&cmd_final_hex[sizeof(datablock)], &CRYPTO, 4);

//and a print gives me AA 35 07 A3 8F BA E8 which is exactly what i want but why do i have to use "&CRYPTO" and not "CRYPTO" in my memcpy. !!!

return 0;


}


My question is, why does this last memcpy works ? i would expect to put CRYPTO and not &CRYPTO in arguments... For me, CRYPTO is the value i want so 0xe8ba8fa3 and &CRYPTO the address. And for me, CRYPTO is not a pointer, so why i need to use memcpy with &CRYPTO to make it works ?



By the way, my code may be pure disaster, i'm a beginner. Do not hesitate to correct me !



Thank you !







c linux pointers unsigned






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 20 at 12:34









HacHac

695




695








  • 2




    great job on creating a Minimal, Complete, and Verifiable example! I feel however that it can be improved. There are still parts of it that are irrelevant to your issue. Here's how I think a better MCVE could look: pastebin.com/3QcR7bLi
    – bolov
    Nov 20 at 12:47














  • 2




    great job on creating a Minimal, Complete, and Verifiable example! I feel however that it can be improved. There are still parts of it that are irrelevant to your issue. Here's how I think a better MCVE could look: pastebin.com/3QcR7bLi
    – bolov
    Nov 20 at 12:47








2




2




great job on creating a Minimal, Complete, and Verifiable example! I feel however that it can be improved. There are still parts of it that are irrelevant to your issue. Here's how I think a better MCVE could look: pastebin.com/3QcR7bLi
– bolov
Nov 20 at 12:47




great job on creating a Minimal, Complete, and Verifiable example! I feel however that it can be improved. There are still parts of it that are irrelevant to your issue. Here's how I think a better MCVE could look: pastebin.com/3QcR7bLi
– bolov
Nov 20 at 12:47












2 Answers
2






active

oldest

votes

















up vote
6
down vote



accepted











My question is, why does this last memcpy works ? i would expect to
put CRYPTO and not &CRYPTO in arguments... For me, CRYPTO is the value
i want so 0xe8ba8fa3 and &CRYPTO the address.




You're right. CRYPTO is not a pointer. However, memcpy expects a pointer, so we have to give it one. We do this by taking CRYPTO 's address, and this is done by adding & to it, hence &CRYPTO.



What memcpy does is copying the memory from one address to the other address (that's why it takes two pointers), regardless of the actual content at those addresses. If you gave it CRYPTO instead of a pointer to it, it would likely interpret the value of CRYPTO as an address (the behavior is undefined, there's no guarantee for what will happen unless the compiler gives one).






share|improve this answer























  • Okay ! Thanks ! So if i understand well, &CRYPTO can be used as the pointer of CRYPTO since it contains the address of CRYPTO ?
    – HacHac
    Nov 20 at 12:40






  • 1




    That's correct.
    – Blaze
    Nov 20 at 12:41










  • Thank you, all clear !
    – HacHac
    Nov 20 at 12:49






  • 1




    "If you gave it CRYPTO instead of a pointer to it, it would interpret the value of CRYPTO as an address" -- that is one thing that might happen, but the behavior is undefined when incorrect types are passed in function calls.
    – David Bowling
    Nov 20 at 14:26






  • 1




    Thanks for the correction, I added it to answer.
    – Blaze
    Nov 20 at 14:30


















up vote
1
down vote













For reference



memcpy void * memcpy ( void * destination, const void * source, size_t num );



Parameters





  • destination : Pointer to the destination array where the content is to be copied, type-casted to a pointer of type void*.


  • source : Pointer to the source of data to be copied, type-casted to a pointer of type const void*.


  • num : Number of bytes to copy. size_t is an unsigned integral type.






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53393111%2funsigned-long-into-char-array%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    6
    down vote



    accepted











    My question is, why does this last memcpy works ? i would expect to
    put CRYPTO and not &CRYPTO in arguments... For me, CRYPTO is the value
    i want so 0xe8ba8fa3 and &CRYPTO the address.




    You're right. CRYPTO is not a pointer. However, memcpy expects a pointer, so we have to give it one. We do this by taking CRYPTO 's address, and this is done by adding & to it, hence &CRYPTO.



    What memcpy does is copying the memory from one address to the other address (that's why it takes two pointers), regardless of the actual content at those addresses. If you gave it CRYPTO instead of a pointer to it, it would likely interpret the value of CRYPTO as an address (the behavior is undefined, there's no guarantee for what will happen unless the compiler gives one).






    share|improve this answer























    • Okay ! Thanks ! So if i understand well, &CRYPTO can be used as the pointer of CRYPTO since it contains the address of CRYPTO ?
      – HacHac
      Nov 20 at 12:40






    • 1




      That's correct.
      – Blaze
      Nov 20 at 12:41










    • Thank you, all clear !
      – HacHac
      Nov 20 at 12:49






    • 1




      "If you gave it CRYPTO instead of a pointer to it, it would interpret the value of CRYPTO as an address" -- that is one thing that might happen, but the behavior is undefined when incorrect types are passed in function calls.
      – David Bowling
      Nov 20 at 14:26






    • 1




      Thanks for the correction, I added it to answer.
      – Blaze
      Nov 20 at 14:30















    up vote
    6
    down vote



    accepted











    My question is, why does this last memcpy works ? i would expect to
    put CRYPTO and not &CRYPTO in arguments... For me, CRYPTO is the value
    i want so 0xe8ba8fa3 and &CRYPTO the address.




    You're right. CRYPTO is not a pointer. However, memcpy expects a pointer, so we have to give it one. We do this by taking CRYPTO 's address, and this is done by adding & to it, hence &CRYPTO.



    What memcpy does is copying the memory from one address to the other address (that's why it takes two pointers), regardless of the actual content at those addresses. If you gave it CRYPTO instead of a pointer to it, it would likely interpret the value of CRYPTO as an address (the behavior is undefined, there's no guarantee for what will happen unless the compiler gives one).






    share|improve this answer























    • Okay ! Thanks ! So if i understand well, &CRYPTO can be used as the pointer of CRYPTO since it contains the address of CRYPTO ?
      – HacHac
      Nov 20 at 12:40






    • 1




      That's correct.
      – Blaze
      Nov 20 at 12:41










    • Thank you, all clear !
      – HacHac
      Nov 20 at 12:49






    • 1




      "If you gave it CRYPTO instead of a pointer to it, it would interpret the value of CRYPTO as an address" -- that is one thing that might happen, but the behavior is undefined when incorrect types are passed in function calls.
      – David Bowling
      Nov 20 at 14:26






    • 1




      Thanks for the correction, I added it to answer.
      – Blaze
      Nov 20 at 14:30













    up vote
    6
    down vote



    accepted







    up vote
    6
    down vote



    accepted







    My question is, why does this last memcpy works ? i would expect to
    put CRYPTO and not &CRYPTO in arguments... For me, CRYPTO is the value
    i want so 0xe8ba8fa3 and &CRYPTO the address.




    You're right. CRYPTO is not a pointer. However, memcpy expects a pointer, so we have to give it one. We do this by taking CRYPTO 's address, and this is done by adding & to it, hence &CRYPTO.



    What memcpy does is copying the memory from one address to the other address (that's why it takes two pointers), regardless of the actual content at those addresses. If you gave it CRYPTO instead of a pointer to it, it would likely interpret the value of CRYPTO as an address (the behavior is undefined, there's no guarantee for what will happen unless the compiler gives one).






    share|improve this answer















    My question is, why does this last memcpy works ? i would expect to
    put CRYPTO and not &CRYPTO in arguments... For me, CRYPTO is the value
    i want so 0xe8ba8fa3 and &CRYPTO the address.




    You're right. CRYPTO is not a pointer. However, memcpy expects a pointer, so we have to give it one. We do this by taking CRYPTO 's address, and this is done by adding & to it, hence &CRYPTO.



    What memcpy does is copying the memory from one address to the other address (that's why it takes two pointers), regardless of the actual content at those addresses. If you gave it CRYPTO instead of a pointer to it, it would likely interpret the value of CRYPTO as an address (the behavior is undefined, there's no guarantee for what will happen unless the compiler gives one).







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Nov 20 at 14:29

























    answered Nov 20 at 12:37









    Blaze

    4,0721528




    4,0721528












    • Okay ! Thanks ! So if i understand well, &CRYPTO can be used as the pointer of CRYPTO since it contains the address of CRYPTO ?
      – HacHac
      Nov 20 at 12:40






    • 1




      That's correct.
      – Blaze
      Nov 20 at 12:41










    • Thank you, all clear !
      – HacHac
      Nov 20 at 12:49






    • 1




      "If you gave it CRYPTO instead of a pointer to it, it would interpret the value of CRYPTO as an address" -- that is one thing that might happen, but the behavior is undefined when incorrect types are passed in function calls.
      – David Bowling
      Nov 20 at 14:26






    • 1




      Thanks for the correction, I added it to answer.
      – Blaze
      Nov 20 at 14:30


















    • Okay ! Thanks ! So if i understand well, &CRYPTO can be used as the pointer of CRYPTO since it contains the address of CRYPTO ?
      – HacHac
      Nov 20 at 12:40






    • 1




      That's correct.
      – Blaze
      Nov 20 at 12:41










    • Thank you, all clear !
      – HacHac
      Nov 20 at 12:49






    • 1




      "If you gave it CRYPTO instead of a pointer to it, it would interpret the value of CRYPTO as an address" -- that is one thing that might happen, but the behavior is undefined when incorrect types are passed in function calls.
      – David Bowling
      Nov 20 at 14:26






    • 1




      Thanks for the correction, I added it to answer.
      – Blaze
      Nov 20 at 14:30
















    Okay ! Thanks ! So if i understand well, &CRYPTO can be used as the pointer of CRYPTO since it contains the address of CRYPTO ?
    – HacHac
    Nov 20 at 12:40




    Okay ! Thanks ! So if i understand well, &CRYPTO can be used as the pointer of CRYPTO since it contains the address of CRYPTO ?
    – HacHac
    Nov 20 at 12:40




    1




    1




    That's correct.
    – Blaze
    Nov 20 at 12:41




    That's correct.
    – Blaze
    Nov 20 at 12:41












    Thank you, all clear !
    – HacHac
    Nov 20 at 12:49




    Thank you, all clear !
    – HacHac
    Nov 20 at 12:49




    1




    1




    "If you gave it CRYPTO instead of a pointer to it, it would interpret the value of CRYPTO as an address" -- that is one thing that might happen, but the behavior is undefined when incorrect types are passed in function calls.
    – David Bowling
    Nov 20 at 14:26




    "If you gave it CRYPTO instead of a pointer to it, it would interpret the value of CRYPTO as an address" -- that is one thing that might happen, but the behavior is undefined when incorrect types are passed in function calls.
    – David Bowling
    Nov 20 at 14:26




    1




    1




    Thanks for the correction, I added it to answer.
    – Blaze
    Nov 20 at 14:30




    Thanks for the correction, I added it to answer.
    – Blaze
    Nov 20 at 14:30












    up vote
    1
    down vote













    For reference



    memcpy void * memcpy ( void * destination, const void * source, size_t num );



    Parameters





    • destination : Pointer to the destination array where the content is to be copied, type-casted to a pointer of type void*.


    • source : Pointer to the source of data to be copied, type-casted to a pointer of type const void*.


    • num : Number of bytes to copy. size_t is an unsigned integral type.






    share|improve this answer

























      up vote
      1
      down vote













      For reference



      memcpy void * memcpy ( void * destination, const void * source, size_t num );



      Parameters





      • destination : Pointer to the destination array where the content is to be copied, type-casted to a pointer of type void*.


      • source : Pointer to the source of data to be copied, type-casted to a pointer of type const void*.


      • num : Number of bytes to copy. size_t is an unsigned integral type.






      share|improve this answer























        up vote
        1
        down vote










        up vote
        1
        down vote









        For reference



        memcpy void * memcpy ( void * destination, const void * source, size_t num );



        Parameters





        • destination : Pointer to the destination array where the content is to be copied, type-casted to a pointer of type void*.


        • source : Pointer to the source of data to be copied, type-casted to a pointer of type const void*.


        • num : Number of bytes to copy. size_t is an unsigned integral type.






        share|improve this answer












        For reference



        memcpy void * memcpy ( void * destination, const void * source, size_t num );



        Parameters





        • destination : Pointer to the destination array where the content is to be copied, type-casted to a pointer of type void*.


        • source : Pointer to the source of data to be copied, type-casted to a pointer of type const void*.


        • num : Number of bytes to copy. size_t is an unsigned integral type.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 20 at 14:30









        static_cast

        4071415




        4071415






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53393111%2funsigned-long-into-char-array%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Feedback on college project

            Futebolista

            Albești (Vaslui)