basics · beginner · ~15 min
Implement a function matching a declared prototype.
Header files declare functions other files implement. Implement int triple(int n) returning 3*n.
int triple(int n) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.