Thursday, 17 April 2014

Difference between int []arr; v/s int arr[];

Difference between int []arr; v/s int arr[];

 

Suppose take an example :

int []a,b;    //   Both ‘a’ and ‘b’ are array references ! 
                                     v/s
int a[],b;   //  In this ‘a’ is an array reference while ‘b’ is a value type variable !

Therefore,
int []arr;   is array reference !
while
int arr[];  is a value type variable !

I hope u guys got the difference !!!

 


No comments:

Post a Comment