summaryrefslogtreecommitdiff
path: root/05/main.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-02-14 11:39:33 -0500
committerpommicket <pommicket@gmail.com>2022-02-14 11:39:33 -0500
commitf7a8a193c2e523b2e670d385244cd2d830453938 (patch)
tree4ab6c5a6620a7d4c9a1d2d8b44d06135d2f095fa /05/main.c
parent1f9534d750d6edb2af39ff9da544ae129ba9a146 (diff)
snprintf now working! (fixed problem will calls inside calls)
Diffstat (limited to '05/main.c')
-rw-r--r--05/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/05/main.c b/05/main.c
index 7503a10..5a25d19 100644
--- a/05/main.c
+++ b/05/main.c
@@ -2,9 +2,9 @@
int main(int argc, char **argv) {
char buf[200] = {0};
- sprintf(buf, "Hello, %d %.2f %g %s %p\n", 187, 77.3, 349e12, "Wow!", "yea");
- // snprintf(buf, 200, "Hello\n"); //<- NOT WORKING
- write(1, buf, sizeof buf);
- return *buf;
+ snprintf(buf, sizeof buf, "Hello, %d %.2f %g %s %p\n", 187, 77.3, 349e12, "Wow!", "yea");
+/* write(1, buf, sizeof buf); */
+ printf("%s\n",buf);
+ return 0;
}