No, "buffer" is an uninitialised object. Assuming it has automatic storage duration, none of its elements are given values, and trying to get a value from that object without first assigning one...