In following code where does 100 in the for loop get stored in the memory of computer?
#include<stdio.h>
main()
{
int i;
for(i=0;i<100;i++)
printf("%d \n",i);
getchar();
}
In following code where does 100 in the for loop get stored in the memory of computer?
#include<stdio.h>
main()
{
int i;
for(i=0;i<100;i++)
printf("%d \n",i);
getchar();
}
The C standard doesn't specify where integer constants are stored.
In practice, it will end up in some read-only memory. In this case it will most likely get merged into the actual code memory (.text
segment).