Funktionsdeklaration innerhalb der Funktion - warum?
Ich lese das Buch "Programming in C" und habe in Kapitel 10 ein Beispiel wie dieses gefunden:
#include <stdio.h>
void test (int *int_pointer)
{
*int_pointer = 100;
}
int main (void)
{
void test (int *int_pointer);
int i = 50, *p = &i;
printf ("Before the call to test i = %i\n", i);
test (p);
printf ("After the call to test i = %i\n", i);
return 0;
}
Ich verstehe das Beispiel, aber ich verstehe die Zeile nichtvoid test (int *int_pointer);
Innenmain
. Warum definiere ich die Signatur vontest
nochmal? Ist das idiomatisch C?