mirror of
https://codeberg.org/DansLeRuSH/c-plus-plus-exercises.git
synced 2024-11-24 20:28:08 +00:00
Enter, calculate and display the size of a variable in memory
This commit is contained in:
parent
051a21c0b1
commit
8189d48c58
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