Rabu, 24 Agustus 2016

Convert Interger to Char Array

Bismillahirrohmanirrohim
Bisa kalian gunakan fungsi ini mudah mudahan bermanfaat,jika merasa belum paham bisa ajukan pertanyaan di komentar atau contact facebook saya atau email fickrymhd@gmail.com

int addres = 02;
int adc = 255;
char indexSend[6];
int digit1,digit2,digit3,digit4,digit5;

sprintf (indexSend, "%02d%03d",addres,adc);
digit1 = indexSend[0];
digit2 = indexSend[1];
digit3 = indexSend[2];
digit4 = indexSend[3];
digit5 = indexSend[4];

Share:

0 comments:

Posting Komentar

Copyright © FILAB | Powered by FILAB
Design by Fickry Muhammad | Technology by Filab.id