From 5a785bfd9f0414c5839692a1a776fc8961910fb0 Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Wed, 3 Jul 2024 11:21:19 +0300 Subject: [PATCH] bool-operations.c: optimize `printf(s "\n")` to `puts(s)` --- c-programming/experiments/bool-operations.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/c-programming/experiments/bool-operations.c b/c-programming/experiments/bool-operations.c index 387c87d..f99a71d 100644 --- a/c-programming/experiments/bool-operations.c +++ b/c-programming/experiments/bool-operations.c @@ -19,29 +19,29 @@ int main(void) { bool boolean = false; unsigned char integer = (unsigned char) boolean; - printf("Loop:\n"); + puts("Loop:"); for (uint8_t i = 0; i < 3; i++) { SHOW_BOOL_INT; boolean++; integer++; } - printf("\n* 2:\n"); + puts("\n* 2:"); boolean *= 2; integer *= 2; SHOW_BOOL_INT; - printf("\n<< 1:\n"); + puts("\n<< 1:"); boolean <<= 1; integer <<= 1; SHOW_BOOL_INT; - printf("\n/ 2:\n"); + puts("\n/ 2:"); boolean /= 2; integer /= 2; SHOW_BOOL_INT; - printf("\n^ 0x10:\n"); + puts("\n^ 0x10:"); boolean ^= 0x10; integer ^= 0x10; SHOW_BOOL_INT; - printf("\n>> 1:\n"); + puts("\n>> 1:"); boolean >>= 1; integer >>= 1; SHOW_BOOL_INT;