unsigned long long type printing in hexadecimal format

后端 未结 4 1985
萌比男神i
萌比男神i 2020-12-23 19:29

I am trying to print out an unsigned long long like this:

  printf(\"Hex add is: 0x%ux \", hexAdd);

but I am getting type conv

4条回答
  •  误落风尘
    2020-12-23 19:59

    try %llu - this will be long long unsigned in decimal form

    %llx prints long long unsigned in hex

提交回复
热议问题