From 8189d48c58062396d9a5b4b067cd9b060b4b5b39 Mon Sep 17 00:00:00 2001 From: Franck ALBARET Date: Fri, 19 Oct 2018 12:38:55 +0000 Subject: [PATCH] Enter, calculate and display the size of a variable in memory --- EX01_taille_memoire_variable.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 EX01_taille_memoire_variable.cpp diff --git a/EX01_taille_memoire_variable.cpp b/EX01_taille_memoire_variable.cpp new file mode 100644 index 0000000..a313134 --- /dev/null +++ b/EX01_taille_memoire_variable.cpp @@ -0,0 +1,11 @@ +// Auteur : Franck ALBARET +#include + + int main (void) + { + int V; + puts ("Entrer une variable :"); + scanf ("%i",&V); + printf("La taille mémoire de la variable est de %i octet(s)\n",sizeof V); + return 0; + }