From b3dad1a612f4486488ac432e307242df4f782682 Mon Sep 17 00:00:00 2001 From: zeekling Date: Thu, 7 Oct 2021 22:23:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0print2.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ chapter3/print2.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 chapter3/print2.c diff --git a/.gitignore b/.gitignore index 092f3c4..ed2714e 100644 --- a/.gitignore +++ b/.gitignore @@ -107,3 +107,5 @@ dkms.conf *.out *.app + +core \ No newline at end of file diff --git a/chapter3/print2.c b/chapter3/print2.c new file mode 100644 index 0000000..6ccefcd --- /dev/null +++ b/chapter3/print2.c @@ -0,0 +1,14 @@ +#include + +int main(int argc, char* argv[]){ + unsigned int un = 3000000000; + short end = 200; + long big = 65537; + long long veryBig = 12345678908642; + printf("un = %u, un not %d\n", un, un); + printf("end = %hd, end not %d\n", end, end); + printf("big = %ld, big not %hd\n", big, big); + printf("veryBig = %lld, veryBig not %ld\n", veryBig, veryBig); + + return 0; +}