Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    ... the result is the size of the entire array rather than the size of the pointer represented by the array identifier. If the identifier represents an array then it doesn't represent any pointer. Commented Jul 18, 2013 at 6:18
  • 2
    Your quote says "...rather the size of pointer represented by array". An array name doesn't represent a pointer. It can conveniently decay into a pointer but that doesn't make it a pointer. Commented Jul 18, 2013 at 6:26
  • You don't really need to quote and explain it yourself. If you want to quote one then look at 6.5.3.4 in C11 which states ...When applied to an operand that has array type, the result is the total number of bytes in the array and may be the definition of sizeof in the same section as well. Commented Jul 18, 2013 at 7:05
  • 1
    A typo here. The addresses would be (decimal values) 343, 351, 359, 367 instead of 343, 344, 345, 346. for 32-bit architecture Commented Sep 4, 2013 at 11:41
  • @noufal Thanks corrected the typo you noticed, but I am assuming 4 byte char* according to codepade I linked the code Commented Sep 4, 2013 at 19:14