Hi, im lookin for a c function which will take hex values stored in two different integer variables say TH1,TL1 . So say TH1 has FF and TL1 has 00,then i need a program that will convert the effective value FF00 to decimal ,ie 65280 stored in a variable say Dec.
kaos 0 Newbie Poster
Recommended Answers
Jump to Postany int variable is inherently an *integer* the value is not stored in any particular base .... hex or decimal or binary, it doesnt matter. the only difference is when you print it.
printf("hex value %04X = decimal value %d\n",Dec, Dec);
but also, what youre asking to do is to …
All 2 Replies
jephthah 1,888 Posting Maven
tux4life commented: Yep, an integer is an integer :) +4
VatooVatoo 21 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.