Purvi mehta
Answered On : Nov 8th, 2006
Ans:- No,&arr will store the address of array.
Login to rate this answer.
yuvraj
Answered On : Mar 13th, 2007
The answer is YES bcoz both arr and &arr gives the base address of an array.
You can try it by a simple example
void main()
{
int arr[10];
printf("%dn",arr);
printf("%d",&arr);
}
Login to rate this answer.
Jyotiranjan Moahnty
Answered On : Oct 8th, 2007
#include<stdio.h>
int main()
{
int arr[2];
printf("%dn",arr);
printf("%dn",(arr+1));
printf("%dn",&arr);
printf("%dn",(&arr+1));
}
Try it, I think it is the better example for you to understand that, arr and &arr is not same. Their starting address is same, but the value in that memory is not same.
I think you are a student. I appreciate, your involvement with this kind of things.
Login to rate this answer.
Sorry, it is not same because arr stores the value where as &arr is the address of that value.
Login to rate this answer.
Arr and &Arr both are same, which will return the address of first element of the array. For example
void main()
{
char arr[10] = "Kishore";
printf("n%u : %u", a, &a);
}
Output:
~~~~~
65516 : 65516
Login to rate this answer.
Mohamed
Answered On : May 8th, 2013
Actually arr and &arr are different.
arr holds the base address of the array arr[], but &arr holds the address of the entire array.
but both expressions points to the same base address.
Code
#include<stdio.h>
int main()
{
int arr[2]={5,6};
",arr);
",(arr+1));
",&arr);
",(&arr+1));
return 0;
}
Login to rate this answer.