#include void main() { extern int a; printf(“n a = %d”, a); } int a = 20;  In the following program where is the variable a getting defined and where it is getting declared?

#include

void main()

{

extern int a;

printf(“n a = %d”, a);

}

int a = 20;

 In the following program where is the variable a getting defined and where it is getting declared?

A. Extern int a is declaration, int a = 20 is the definition

B.  Int a = 20 is declaration, extern int a is the definition

C. Int a = 20 is definition, a is not defined

D. a is declared, a is not defined

Hướng dẫn

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

 

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