‘sizeof’ on array function parameter ‘arr’ will return size of ‘int*’ [-Wsizeof-array-argument]
Code:#includeusingnamespacestd;intTest(inta[],intlength,intx){intlength=sizeof(a)/sizeof(a[0]);return0;}intmain(){inta[]={1,2,3,4,5,6,7,8,9,10,11,12};intlength=sizeof(a)/sizeof(a[0]);Test(a,length,2);