Saturday, October 30, 2010

Ans for 'C' confusion.

Actually when we declare an array of a[5], then legally the processor allocates 20 bytes in main memory. This 20 bytes are completely in use of the program where we have declared the array. Further more, if our main memory has extra space  immediately after this 20 bytes then it allocates them to the program. Suppose if we insert 10 elements in an array of size 5 and f memory is available and free then it will be allowed and if memory is not available then the program will show error or else our program may be terminated.

If more explanation is needed, then do post a comment.. This topic will be explained in detail then after..

Thank you.
Shivang Desai.

No comments:

Post a Comment