为什么这个C++代码片段分段有问题?

lor*_*orb 2 c++ segmentation-fault

#include <iostream>
using namespace std;

int recur(int x) {
    1 and recur(--x);
    cout << x;
    return x;
}

int main() {
    recur(10);
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

Nav*_*een 5

这是一个无限的递归.因此当它耗尽堆栈空间时它将会出错.