
8.18 Data Structures Using C
# include <stdio.h>
# include <conio.h>
void main()
{
int j=10;
clrscr();
printf("\n Value of j is %2d & it’s address is = %u",j,&j);
{
int j=5;
printf("\n Value of j is %2d & it’s address is = %u",j,&j);
}
printf("\n Value of j is %2d & it’s address is = %u",j,&j);
}
OUTPUT:
Value of j is 10 & it’s address is = 65496
Value of j is 5 & it’s address is = 65494
Value of j is 10 & it’s address is = 65496
Explanation:
In this program you can observe that a variable int j is declared twice, first, immediately in
main () function and second, declaration is done in a separate block inside the main ()
function. The ...