Thread subject: Explore Your Brain :: convert text to hexa

Posted by stef_zhang on 27-06-2010 00:00
#1

kk xyb, minta bantuan nya donk.. tolong di explore code buat konversi text ke hexa. dan sebaliknya.
misalkan :

diinput : explore
setelah jadi hexa : 6578706c6f7265

Thanks sebelumnya buat semua.

Posted by bad_samt on 28-06-2010 20:15
#2

cari aja or tanya om google aja bos..

tapi klo ga moa repot" ne cara ubah Text jadi Hexadesimal, tp ne Online
http://www.string-functions.com/string-hex.aspx

kalo bentuk software juga ada bos...
tp pada masih trial yg ane punya....

Edited by bad_samt on 28-06-2010 20:21

Posted by stef_zhang on 29-06-2010 01:01
#3

bad_samt wrote:
cari aja or tanya om google aja bos..

tapi klo ga moa repot" ne cara ubah Text jadi Hexadesimal, tp ne Online
http://www.string-functions.com/string-hex.aspx

kalo bentuk software juga ada bos...
tp pada masih trial yg ane punya....



Thanks infonya.. sy juga pake link itu sebelum nya... jadi kali ini mau coding nya.. ok de... aye explore dulu... :)

Posted by EVA-00 on 12-07-2010 17:44
#4

Untuk convert text ke hexa di C/C++ bisa pake fungsi itoa

contoh program :

Code
/* itoa example */
#include <stdio.h>
#include <stdlib.h>

int main ()
{
  int i;
  char buffer [33];
  printf ("Enter a number: ");
  scanf ("%d",&i);
  itoa (i,buffer,10);
  printf ("decimal: %s\n",buffer);
  itoa (i,buffer,16);
  printf ("hexadecimal: %s\n",buffer);
  itoa (i,buffer,2);
  printf ("binary: %s\n",buffer);
  return 0;
}




Output program diatas :

Enter a number: 1750
decimal: 1750
hexadecimal: 6d6
binary: 11011010110


Semoga membantu, sumber bisa di baca2 disini