By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,171 Members | 930 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,171 IT Pros & Developers. It's quick & easy.

How to printf a long long data type integer?

P: n/a
Greetings,

I need to use a long long data type integer in my program, but how to print
it with printf() or an alternative? My platform is Solaris 2.7 32bit
operating system, and I use Sun Forte 6 C compiler.

Thanks in advance!
Evan
Nov 14 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Mon, 5 Jan 2004 09:23:26 +0800, "music4" <mu****@163.net> wrote in
comp.lang.c:
Greetings,

I need to use a long long data type integer in my program, but how to print
it with printf() or an alternative? My platform is Solaris 2.7 32bit
operating system, and I use Sun Forte 6 C compiler.

Thanks in advance!
Evan


The conversion specifiers for long long include "%lld" "%llu" "%llx"
and so on.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 14 '05 #2

P: n/a
Jack,

Thank you so much. It solved my problem. By the way, where you get the
knowledge, I did never read them from any book.

Evan

"Jack Klein" <ja*******@spamcop.net> wrote in message
news:kh********************************@4ax.com...
On Mon, 5 Jan 2004 09:23:26 +0800, "music4" <mu****@163.net> wrote in
comp.lang.c:
Greetings,

I need to use a long long data type integer in my program, but how to print it with printf() or an alternative? My platform is Solaris 2.7 32bit
operating system, and I use Sun Forte 6 C compiler.

Thanks in advance!
Evan


The conversion specifiers for long long include "%lld" "%llu" "%llx"
and so on.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html

Nov 14 '05 #3

P: n/a
music4 wrote:
"Jack Klein" <ja*******@spamcop.net> wrote in message
<mu****@163.net> wrote in
I need to use a long long data type integer in my program,
but how to print it with printf() or an alternative? My
platform is Solaris 2.7 32bit operating system, and I use
Sun Forte 6 C compiler.


The conversion specifiers for long long include "%lld" "%llu"
"%llx" and so on.


Thank you so much. It solved my problem. By the way, where you
get the knowledge, I did never read them from any book.


Probably from the C99 standard. Google for N869 for a free
version of the last draft.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.