Doubt in memory allocation

Правка en1, от rogerfederer07, 2020-11-19 06:31:27
int a[100];
for(int i = 0; i < 100; ++i) {
    cin >> a[i];
}

and

for(int i = 0; i < 100; ++i) {
    int val;
    cin >> val;
}

My doubt is whether both the code snippets consume same amount of memory ?

Thanks in advance!

Теги #memory

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский rogerfederer07 2020-11-19 08:14:25 86
en3 Английский rogerfederer07 2020-11-19 06:33:47 0 (published)
en2 Английский rogerfederer07 2020-11-19 06:33:07 63 (saved to drafts)
en1 Английский rogerfederer07 2020-11-19 06:31:27 300 Initial revision (published)