Pages

Saturday, February 6, 2016

C program to print memory addresses of an array elements.

void main() 
{
float number[2];
printf("%d \n",&number[0]);
printf("%d \n",&number[1]);
printf("%d \n",&number[2]);
}

Output of program:

2293432
2293436
2293440

Output will be different on your computer.

Think why numbers are incremented by value 4 ?


* * * * *





You may also like to learn following programs:

2 comments: