3 ms·
That's a pretty design, but a rather typical function pointer demonstration. It's at least more unusual if you change main to this: int main(void) {
by dlsspy 17y ago
That's a pretty design, but a rather typical function pointer demonstration. It's at least more unusual if you change main to this:
int main(void) {
char *sayings[] = {
"I know a secret!", "WHAT", "WHAT again", NULL
};
int i = 0;
for (i = 0; sayings[i]; i++) {
(i ? say_loud : say_soft)(sayings[i]);
}
return 0;
}