JavaScript is required

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

#include <stdio.h> 
void main() 
{ 
    extern int a; 
    printf("\n a = %d", a); 
} 
int a = 20; 

 

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ãy suy nghĩ và trả lời câu hỏi trước khi xem đáp án

Câu hỏi này thuộc đề thi trắc nghiệm dưới đây, bấm vào Bắt đầu thi để làm toàn bài

Tổng hợp câu hỏi trắc nghiệm lập trình C/C++ có đáp án và lời giải đầy đủ nhằm giúp các bạn dễ dàng ôn tập lại toàn bộ các kiến thức.

15/10/2020 10:47:55
798 lượt thi

Câu hỏi liên quan