🔒 Closed convert char array to hex and pass the value as string?

Status
Not open for further replies.

fireclouu

Fanatic
iexplain ko rito yung gusto kong mangyari (paki assume na lang po na declared na mga variables):
C:
var[1]='A';

kaya ko siya iprint ng hex:
C:
printf("%x", var[1]); // 41

paano ko po kaya maipapasa as 41 sa another char yung var[1]? nagresearch ako ng kaunti, nagagawa raw to ng memcpy pero di ko makuha procedure niya.

salamat 😁

ps. may workaround ako para dito, kaso di ako kuntento baka may alam kayo na direkta yung manipulation, plano ko sana i-fprintf tapos iread yung text saka ipasa sa variable
 
Status
Not open for further replies.

About this Thread

  • 1
    Replies
  • 515
    Views
  • 2
    Participants
Last reply from:
homer_simpson

Trending Topics

Online now

Members online
971
Guests online
927
Total visitors
1,898

Forum statistics

Threads
2,280,277
Posts
28,996,327
Members
1,226,687
Latest member
taitranhia
Back
Top