Skip to content

Instantly share code, notes, and snippets.

@tiger1710 tiger1710/Tail Call.cpp

Last active Feb 19, 2019
What would you like to do?
#include <iostream>
using namespace std;
int f(int a) {
a = 0;
return a;
int foo1(int b) {
return f(b) + 1;
int foo2(int c) {
return f(c);
int main(void) {
cout << foo1(10) << '\n';
cout << foo2(10) << '\n';
return 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.