0

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...

ulaga
  • 93
  • 1
  • 5
  • 11

1 Answers1

1
char *seqBuf = "81BD82E8", *end;
unsigned long x = strtoul(seqBuf, &end, 16);
printf("longVal= %u\n", x);
Garett
  • 16,632
  • 5
  • 55
  • 63
ulaga
  • 93
  • 1
  • 5
  • 11