diff options
author | pommicket <pommicket@gmail.com> | 2022-02-14 11:39:33 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-02-14 11:39:33 -0500 |
commit | f7a8a193c2e523b2e670d385244cd2d830453938 (patch) | |
tree | 4ab6c5a6620a7d4c9a1d2d8b44d06135d2f095fa /05/main.c | |
parent | 1f9534d750d6edb2af39ff9da544ae129ba9a146 (diff) |
snprintf now working! (fixed problem will calls inside calls)
Diffstat (limited to '05/main.c')
-rw-r--r-- | 05/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; } |