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 3 84666
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
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! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Hans Ginzel |
last post by:
Hello,
let us consider function
int foo(char *name, void *data) {
...
printf(name, data); /* Should be *data? */
...
}
|
by: sunfiresg |
last post by:
During an interview, I am asked to answer a question:
Printf is a major formatted output function provided by the standard C
library. Printf accepts a formatting string followed by a various...
|
by: infobahn |
last post by:
printf("%p\n", (void *)0); /* UB, or not? Please explain your answer. */
|
by: nandh_dp |
last post by:
When the below program is compiled and executed,
#include <stdio.h>
#define MASK 0xFFFFFFULL
main() {
unsigned long long a;
unsigned long b, c;
|
by: v4vijayakumar |
last post by:
why the following statement dumps the core(Segmentation fault)?
printf("%s\n", __FILE__);
|
by: dank |
last post by:
http://msdn2.microsoft.com/en-us/library/tcxf1dw6.aspx
describes the integer format modifiers accepted by Microsoft's printf.
...
|
by: timmu |
last post by:
Someone asked me a question about integer division and printf
yesterday,
I tell him he should do a casting to float/double before you do any
interger division.
But he doesn't think so, so I try...
|
by: indigodfw |
last post by:
Hi experts
Consider this piece of code
unsigned long data = 124; /* Data is actually part of a big struct but
to simplify */
printf(" %-5llu ", (unsigned long long)(data*1000));
<memory...
|
by: somenath |
last post by:
Hi All,
I have one question regarding the behavior of printf function.
In page number of 154 in K&R2 in Table 7-1 it is stated that
Characters Argument Type :...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |