mirror of
https://codeberg.org/DansLeRuSH/c-plus-plus-exercises.git
synced 2024-11-23 03:48:07 +00:00
Display the size in memory of a variable
This commit is contained in:
parent
8456db70af
commit
d42e6068ed
1 changed files with 11 additions and 0 deletions
11
EX01_taille_memoire_variable.cpp
Normal file
11
EX01_taille_memoire_variable.cpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
// Auteur : Franck ALBARET
|
||||
#include <stdio.h>
|
||||
|
||||
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;
|
||||
}
|
Loading…
Reference in a new issue