As I have learnt,array name acts like a pointer to first element.But:
int c[]={0,1,2};
printf("%d \t %d",c,&c[0]); //Different values,Why?
Also then why *c=0?
Just a guess: you're on a platform with 64-bit pointers and 32-bit int. Your code passes two pointer values to printf, which then interprets these as int values; that might print the two halves of a 64-bit pointer as two separate integers.
You should print pointers with %p, not %d, after casting them to void*.
*cis the same asc[0]and you have set the first element ofcto be0so that explains that part.%p, not%d. Sometimes it doesn't matter much, on some platforms it does a lot.&c[0]is anint*, but%dexpects anint. You should cast the pointer tovoid*and use%p, or (assuming your platform supports this) cast touintptr_tand use one of the macros from<inttypes.h>.