From a225a6f70b5c99df0c92b86a82b5239f7f246a4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20G=C3=B6r?= Date: Wed, 24 Jan 2024 14:01:20 +0300 Subject: [PATCH] print variables in different ways --- c-basic/print_variables.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 c-basic/print_variables.c diff --git a/c-basic/print_variables.c b/c-basic/print_variables.c new file mode 100644 index 0000000..7385a61 --- /dev/null +++ b/c-basic/print_variables.c @@ -0,0 +1,24 @@ +/** + * @file print_variables.c + * @author Mert Gör (mertgor@masscollabs.xyz) + * @brief print variables with different ways + * @version 0.1 + * @date 2024-01-24 + * + * @copyright Copyright (c) 2024 Mert Gör and contributors - GPLv3 or any later + * + */ +#include + +int main(){ + int a = 10; + int b = 20; + + // int a = 10, b = 20; is another option + + printf("a = %d, b = %d\n", a, b); + printf("a = %d, b = %d\n", b, a); + printf("a and b printed together = %d%d\n", a, b); + + return 0; +} \ No newline at end of file