mirror of
https://codeberg.org/DansLeRuSH/c-plus-plus-exercises.git
synced 2024-11-24 12:18:09 +00:00
Program for entering, calculating and displaying the size of a variable in memory
This commit is contained in:
parent
1aa39ee49a
commit
0347383e48
1 changed files with 11 additions and 0 deletions
11
EXO-01_taille_memoire_variable.cpp
Normal file
11
EXO-01_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