Question 15: Which of the following statements describe the results of executing the code snippet below in C++?

int var = 1;

void main()

{

    int i = i;

}

 

    A. The i within main will have an undefined value.

    B. The compiler will allow this statement, but the linker will not be able to resolve the declaration of i.

    C. The i within main will have a value of 1.

    D. The compiler will not allow this statement.

    E. The result is compiler-dependent.

 

 

A E

你可能感兴趣的:(C++,compiler,linker)