From c502092552c89814723555f0e9c02e5967b80925 Mon Sep 17 00:00:00 2001 From: shehani009 Date: Tue, 6 Oct 2020 18:46:56 +0530 Subject: [PATCH] Program --- progamnew.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 progamnew.c diff --git a/progamnew.c b/progamnew.c new file mode 100644 index 0000000..58ecd5e --- /dev/null +++ b/progamnew.c @@ -0,0 +1,15 @@ +#include +int main() { + int intType; + float floatType; + double doubleType; + char charType; + + // sizeof evaluates the size of a variable + printf("Size of int: %zu bytes\n", sizeof(intType)); + printf("Size of float: %zu bytes\n", sizeof(floatType)); + printf("Size of double: %zu bytes\n", sizeof(doubleType)); + printf("Size of char: %zu byte\n", sizeof(charType)); + + return 0; +} \ No newline at end of file