projects
/
scf.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b93c8ac
)
add ../examples/print.c
author
yu.dongliang
<18588496441@163.com>
Wed, 22 Mar 2023 13:17:14 +0000
(21:17 +0800)
committer
yu.dongliang
<18588496441@163.com>
Wed, 22 Mar 2023 13:17:14 +0000
(21:17 +0800)
examples/print.c
[new file with mode: 0644]
patch
|
blob
diff --git a/examples/print.c
b/examples/print.c
new file mode 100644
(file)
index 0000000..
b31498e
--- /dev/null
+++ b/
examples/print.c
@@ -0,0
+1,17
@@
+
+int printf(const char* fmt, ...);
+
+int main()
+{
+ char buf[1024];
+
+ float f = 2.71828;
+ double d = -3.1415926;
+ int64_t i64 = -255;
+
+ int ret = printf("i: %d, ld: %ld, x: %x, x: %#lx, p: %p, s: %s, f: %f, d: %lf\n",
+ 100, i64, 254, 253, buf, "hello", f, -3.14);
+
+ return ret;
+}
+