C - copy characters ASCII value to 64bits integer

As we all know, each printable character has its ascii value. I'm trying to 8 characters' ascii value to 64 bits integer, but it only copies 32 bits. char * ch = "AAAABBBB"; unsigned long int i; //copy charater's ascii to 64 bits int memcpy(&i, ch, 8); printf("integer hold: 0x%x\n", i); Is there something wrong with this code? Output I expect was: integer hold: 0x4141414142424242 but output was: integer hold: 0x41414141
Turn up your warnings!

以上就是C - copy characters ASCII value to 64bits integer的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » CSS3 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准