returning pointer to a structure in C

前端 未结 4 366
情书的邮戳
情书的邮戳 2021-01-26 12:11

this program returns a pointer to a structure.
When i print the contents, the name is not being displayed properly, where as the other tw

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-26 12:51

    You create a local variable stu which lives in a function create(). A pointer on this variable is incorrect outside function create().

提交回复
热议问题