int maxcount=99;appearing outside any function causes this variable to be stored in the initialized data segment with its initial value.
long sum[1000];appearing outside any function causes this variable to be stored in the uninitialized data segment.
int abc = 1; ----> Initialized Read-Write Data char *str; ----> BSS const int i = 10; ----> Initialized Read-Only Data main() { int ii,a=1,b=2,c; ----> Local Variables on Stack char *ptr; ptr = malloc(4); ----> Allocated Memory in Heap c= a+b; ----> Text }