extern int fun( ) ; int fun( ); Is there any difference between following declarations?

extern int fun( ) ;

int fun( );

Is there any difference between following declarations?

A. Both are identical

B. No difference, except extern int fun( ); is probably in another file

C.  int fun( ); is overrided with extern int fun( );

D. None of these

Hướng dẫn

Chọn B là đáp án đúng

Xem lời giải

Xem lời giải

Khi bạn cần gọi hàm từ file .c vào file .cpp, bạn cần phải extern function

 

Thư viện tài liệu12 Tháng bảy, 2023 @ 2:57 chiều

Đánh giá chủ đề này
How to whitelist website on AdBlocker?

How to whitelist website on AdBlocker?

  1. 1 Click on the AdBlock Plus icon on the top right corner of your browser
  2. 2 Click on "Enabled on this site" from the AdBlock Plus option
  3. 3 Refresh the page and start browsing the site