C function declaration within another function

后端 未结 5 1170
孤城傲影
孤城傲影 2021-01-05 10:49

can anyone explain these lines to me:

int xyz( void )  
{ 
extern void abc( void );
}

a function declaration within a function definition?

5条回答
  •  旧巷少年郎
    2021-01-05 11:48

    Yes, your guess is correct. It's declaring the existence of the function abc(), so it may be referenced within xyz(). Note that the extern is unnecessary, as functions are extern by default.

提交回复
热议问题