|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Array Address
Hai all.
I want clarification about array address just follow the example void main() { int temp[10]; printf("%u",temp); printf("%u",&temp); } in the above program lets say array address is 1000 then the two printfs returning the same address ( 1000 ). Is there any reason? Arrayname itself is the address of the array. when i am doing &temp , it should get the address of the temp which holding the address of the array same thing happening when i am refering Fuction addresses |
|
#2
|
||||
|
||||
|
That's because in C, when you're dealing with arrays, temp is a synonym for &temp[0].
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > Array Address |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|