Re:Are pointers and arrays equivalent in C? (2009)
by wbsun on Saturday March 21, 2015 @01:10PM
(#9243361)
Aren't everything equivalent in C?
[ Parent
| on HN ]
Re:Are pointers and arrays equivalent in C? (2009)
by wbsun on Saturday March 21, 2015 @11:05PM
(#9245391)
Why down vote? I don't think anyone who disagrees with this really knows C, or more accurately, how most computers work. Can down voters name something that can't be converted to any others? Unless you are using a Harvard architecture, anything in memory are equivalent.
Re:Are pointers and arrays equivalent in C? (2009)
by SamReidHughes on Sunday March 22, 2015 @01:40AM
(#9245741)
You can't just freely reinterpret memory in C without following certain rules, or you get undefined behavior. Also, types have sizes, and alignment restrictions, and on some systems, trap representations.
Re:Are pointers and arrays equivalent in C? (2009)
by wbsun on Sunday March 22, 2015 @01:48PM
(#9247611)
Hmm, I am glad to know so many people stop at the boundary of compiler's restrictions and abstractions. btw, please do not misuse and misinterpret John's blog sooo, he is one of my most respected professors.
Re:Are pointers and arrays equivalent in C? (2009)
by Ono-Sendai on Saturday March 21, 2015 @11:14PM
(#9245417)
C has types. Variables of different types generally aren't equivalent.
Re:Are pointers and arrays equivalent in C? (2009)
by peterfirefly on Sunday March 22, 2015 @09:10AM
(#9246621)
http://blog.regehr.org/archives/213
I would downvote you, too, if I could.