Hello, Guna!

Though I understand your question, it is always better to
explain a bit in order to remove ambiguities.

See my answers below...


> -----Original Message-----
> From: civics@oocities.com [mailto:civics@oocities.com]
> Sent: Friday, February 02, 2007 3:04 PM
> To: vijay.zanvar@wipro.com
> Subject: Survey Results
>
> Name = Guna
> URL = sgunasekhar@rediffmail.com
> Comments = -> Diff b/w
> char [] = {"abc"};
> char *p = "abc";
>

You will find answer to this at the following links:
http://www.oocities.org/vijoeyz/faq/c/str-arr.html
and
http://www.oocities.org/vijoeyz/faq/c/string_literal.html


> -> Diff b/w arr and &arr; and why?
> int a[] = {1,2,3};
> int *arr;
> arr = a;
> printf("%u%u",arr,&arr);





This one is a very tricky to understand.  Though you might
have seen the same values printed for "arr" and "&arr", but
their interpretation is different.  You should first
understand the situations that gives an array name the value
of base address of that array.

Please be informed that mentioning the array name DOES NOT
give the base address, if:

   * it is the operand of the sizeof operator, or
   * it is the operand of the address-of (&) operator, or
   * it is a string literal used to initialize an array

So, "arr" is the base address of array, where as "&arr" is
address of the entire array!

Wait... I have confused between "int a[]" and "int *arr".
No matter, the above should be useful for you in other
situations.  Answer follows once again...

If your question is why "arr" and "&arr" have different values,
then you should understand this:

   * Every variable will have an address  (agree?)
   * "arr" is also a variable  (is it not?)
   * So, according to the first statement, "arr" should have an
     address, too!  (do you not think?)
   * Every variable has a value (agree?)
   * Do you not think that the value ("arr") and address ("&arr")
     of a variable are different from each other?

Does this answer your question?  If not, please read again the
above points, and/or discuss with your friend/s.

>
> printf("%d%d",arr+1,&arr+1);
>

If you have understood the above explanation, then this is easy
to understand.  Due to lack of time, I am unable to answer in
more detail.  A similar question is here:
http://www.oocities.org/vijoeyz/faq/c/arr_vs_ptr.html


Best,
Vijay Zanvar