R
ramasubramanian.rahul
if we have a declaration
int arr[] = { 1,2,3,4,5};
int *ptr;
what is the diff betn ptr = &a and ptr = a ;
when i do
ptr = &a ;
or ptr = a ;
and then ptr += 2 ;
then *ptr points to 3 in both cases
Basically , my doubt is whether the statement " array name is same as
the address of array " true in all cases without exception and can both
be used interchangebly ..??
kind regards
rahul
int arr[] = { 1,2,3,4,5};
int *ptr;
what is the diff betn ptr = &a and ptr = a ;
when i do
ptr = &a ;
or ptr = a ;
and then ptr += 2 ;
then *ptr points to 3 in both cases
Basically , my doubt is whether the statement " array name is same as
the address of array " true in all cases without exception and can both
be used interchangebly ..??
kind regards
rahul