What exactly is the array name in c?

前端 未结 6 850
无人共我
无人共我 2020-11-22 10:47

I am having a tough time understanding the type and use of the name of the array in C. It might seems a long post but please bear with me.

I understand that the foll

6条回答
  •  盖世英雄少女心
    2020-11-22 11:05

    From C99 Standard n1124 6.3.2.1 p3

    Except when it is the operand of the sizeof operator or the unary & operator, or is a string literal used to initialize an array, an expression that has type ‘‘array of type’’ is converted to an expression with type ‘‘pointer to type’’ that points to the initial element of the array object and is not an lvalue. If the array object has register storage class, the behavior is undefined.

提交回复
热议问题