Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: changing hex to decimal

2009-08-04 by iijfet

--- In AVR-Chat@yahoogroups.com, "aligole_2005" <aligole_2005@...> wrote:
>
> Hi friends
> I want to make a function in Code vision to change a hexadecimal byte to decimal or int, Can anybody help me?
> Maybe it 'll be good that you know the hex data is stored in a string with the length of 5 byte.
> in fact I want to have the c code of the function that gives a char or string hex data and give me the decimal data.
>

this is:
#include <stdio.h>
 int main()

 {
       int hexa;

      scanf("%x", &hexa);
      printf("%d", hexa);

        return 0;

 }

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.