mailing list of musl libc
 help / color / mirror / code / Atom feed
From: " ." <yedexi1996@qq.com>
To: musl <musl@lists.openwall.com>
Subject: [musl] Question about the printf()
Date: Thu, 10 Oct 2024 09:37:10 +0800	[thread overview]
Message-ID: <tencent_4D66BAF27DD772ADE6C0E817DA7CC1F57609@qq.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 493 bytes --]

Hi
I have one question in printf.
When I use printf to print data, I find that printf hides the data after '\0' when printing '\0'.


int main()
{
&nbsp; &nbsp; char c = '\0';
&nbsp; &nbsp; printf("c: %c , 111111 \n", c);
&nbsp; &nbsp; return 0;
}
As shown in the above code, musl library printing will only display "c:", and the following "11111" data will not be displayed.&nbsp;
Under mac and linux systems, the code will print "c:, 111111" completely.
Best&nbsp;
ye

&nbsp;

[-- Attachment #2: Type: text/html, Size: 710 bytes --]

             reply	other threads:[~2024-10-10  1:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-10  1:37  . [this message]
2024-10-10  1:51 ` Rich Felker

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=tencent_4D66BAF27DD772ADE6C0E817DA7CC1F57609@qq.com \
    --to=yedexi1996@qq.com \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).