For (int x = 0; x<strlen(string);x++) printf("%02X", string[x]); I don't think printf will do the entire string by itself. > -----Original Message----- > From: c400-l-bounces@xxxxxxxxxxxx > [mailto:c400-l-bounces@xxxxxxxxxxxx] On Behalf Of > Gene_Gaunt@xxxxxxxxxxxxxxx > Sent: Wednesday, November 19, 2003 9:33 AM > To: C400-l@xxxxxxxxxxxx > Subject: [C400-L] display strings in hexadecimal on stdio > > > Does printf have a type to display a string as hexadecimal to > stdio? For > example given > > char string = "12"; > > what C code will display F1F200 to the display (stdio)? > > _______________________________________________ > This is the C programming iSeries / AS400 (C400-L) mailing list > To post a message email: C400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/c400-l > or email: C400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/c400-l. >
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.