Multiple Choice Question

Quiz Guidelines

 

QID: 
276
Question: 

Given the following set of member declarations, which of the following is true?

int a;    //  (1) 
static int a;    //  (2)
int f( )   { return a; }    //  (3) 
static int f( ) { return a; }    //  (4)

Select 2 options 

A. Declarations (1) and (3) cannot occur in the same class definition. 
B. Declarations (2) and (4) cannot occur in the same class definition. 
C. Declarations (1) and (4) cannot occur in the same class definition. 
D. Declarations (2) and (3) cannot occur in the same class definition. 
E. Declarations (1) and (2) cannot occur in the same class definition. 

Q&A Set: