How can I return an anonymous struct in C?

前端 未结 7 643
青春惊慌失措
青春惊慌失措 2020-12-17 07:49

Trying some code, I realized that the following code compiles:

struct { int x, y; } foo(void) {
}

It se

相关标签:
7条回答
  • 2020-12-17 08:38

    Or you could create infinite recursion:

    struct { int x, y; } foo(void) {
       return foo();
    }
    

    Which I think is completely legal.

    0 讨论(0)
提交回复
热议问题