in array declaration int[] k,i and int k[],i;

前端 未结 2 1251
Happy的楠姐
Happy的楠姐 2020-12-07 03:43

While declaring array we can use brackets any side of the identifier but in the case:

int[] k,i;

and

int k[],i;

2条回答
  •  旧巷少年郎
    2020-12-07 04:12

    Think of it like this:

    (int[]) k, i
    

    int (k[]), (i)

    In the first example, the brackets are associated with the int keyword, specifying that you want to create int arrays. In the second, you specify type int, then declare an array of ints k, and an int i.

提交回复
热议问题