linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sapuglha <sapuglha@yahoo.com.br>
To: linux-c-programming@vger.kernel.org
Subject: Newbie Question -> writing Hexadecimal values
Date: Thu, 25 Sep 2003 18:11:17 -0300	[thread overview]
Message-ID: <20030925181117.256d0a31.sapuglha@yahoo.com.br> (raw)

Hello people,

my problem is:

I have an hexadecimal value. It's char, but correspond to an hexa value. Then I
want to write it to a file. But in the file, if viewed in hexa (ie. using
hexdump) I want to see "3e" and not the correspondig values in hexa to "3" and
to "e".

An example that works:

	fprintf(test, "%c", 0x3e);

But in my case "3e" is stored in a variable, so I'd like to use something like:

	strcmp(variable, "3e");
	fprintf(test, "%c", variable);

Is it possible? Any light?

Thanks 

-- 
 
=> Tiago Sant' Anna - Linux user #136940
	[.. ..]

             reply	other threads:[~2003-09-25 21:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-25 21:11 Sapuglha [this message]
     [not found] ` <3F735CC4.5030507@ig.com.br>
2003-09-25 21:35   ` Newbie Question -> writing Hexadecimal values Sapuglha
2003-09-25 22:36     ` Jeff Woods
  -- strict thread matches above, loose matches on Subject: below --
2003-09-25 21:36 Sandro Dangui
2003-09-25 21:38 ` Sapuglha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030925181117.256d0a31.sapuglha@yahoo.com.br \
    --to=sapuglha@yahoo.com.br \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).