mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-11-30 23:47:58 +00:00
9 lines
361 B
C
9 lines
361 B
C
int calculate(int value) { return value + 1; }
|
|
int through_pointer(int value) {
|
|
int (*operation)(int) = calculate;
|
|
return operation(value);
|
|
}
|
|
int direct(int value) { return calculate(value); }
|
|
int outer(int value) { return direct(value) + through_pointer(value); }
|
|
const char *label = "compute";
|
|
// compute is also a first-class function pointer value.
|