I just got a question from my Friend.
#include<stdio.h>
void fun(int[][3]);
int main(void){
int a[3][3]={1,2,3,4,5,6,7,8,9};
fun(a);
printf("\n%u",a);
a++;//Ques 1
printf("\n%u",a);
printf("%d",a[2][1]-a[1][2]);
return 0;
}
void fun(int a[][3]){
++a;//Ques 2
a[1][1]++;
}
The line Ques 1 will throw an error of L value as 'a' is the name of a two dimensional array. But this is not happening with the case of line Ques 2.
Can any one clear this doubt?