开发者

Conversion of 32-bit Hex to integer

开发者 https://www.devze.com 2023-01-21 18:46 出处:网络
I want to convert 32-bit Hex to integer in \'C\' seqBuf = \"81BD82E8\" This is the Hex value I\'m getting and stored in a buffer

I want to convert 32-bit Hex to integer in 'C'

seqBuf = "81BD82E8" This is the Hex value I'm getting and stored in a buffer

The corresponding value of that hex value is 2176680680

How to convert? Please help me....

Is there any function "strtoull()" as like strtoul()...

Thanks in advance...开发者_如何学C


char *seqBuf = "81BD82E8", *end;
unsigned long x = strtoul(seqBuf, &end, 16);
printf("longVal= %u\n", x);
0

精彩评论

暂无评论...
验证码 换一张
取 消