This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C question regarding printf

int temp 1 , temp2;

         temp1  = ((packet_analyze[i]     << 56)  & 0xFF000000);
         temp1 |= ((packet_analyze[i+1]   << 48)  & 0x00FF0000);
         temp1 |= ((packet_analyze[i+2]   << 40)  & 0x0000FF00);
         temp1 |= ((packet_analyze[i+3]   << 32)  & 0x000000FF);
         temp2  = ((packet_analyze[i+4]   << 56))  & 0xFF000000;
         temp2 |= ((packet_analyze[i+5]   << 48))  & 0x00FF0000;
         temp2 |= ((packet_analyze[i+6]   << 40))  & 0x0000FF00;
         temp2 |= ((packet_analyze[i+7]   << 32))  & 0x000000FF;
          printf("Source address= 0x%0.8x%0.8x\n",temp1,temp2);

Expected output = 0x0af2446a20b23ff5
Output obtained = 0x000000000000000

0