Following program would state my doubt clearly I think,so I posted the program:
#include int main() { int a[]={1,2,3,4,5};
C++ has an implicit conversion between an array reference and a pointer. This has been asked many times before, see for example this SO question.