GlobalEdge Previous Years Solved Sample Placement Papers
- Which of the following statement is correct?
A) A reference has to be de-referenced to access a value.
B) A reference does not need to be de-referenced to access a value.
C) A reference has to be double de-referenced to access a value.
D) Whether a reference should be de-referenced or not depends on the type of the reference.
Ans: B - reference is like a _____.
A) pointer
B) structure
C) macro
D) enum
Ans: A - Which of the following statement is correct?
A) A reference is declared using * operator.
B) Once a reference variable has been defined to refer to a particular variable it can refer to any other variable.
C) A reference must always be initialized within classes.
D) A variable can have multiple references.
Ans: D - Identify the incorrect statement
A) A reference is the alternate name of the object
B) A reference value once defined can be reassigned
C) A reference value once defined cannot be reassigned
D) none of the mentioned
Ans: C - What does a reference provide?
A) Alternate name for the class
B) Alternate name for the variable
C) Alternate name for the pointer
D) none of the mentioned
Ans: B - Which of the following statements is correct?
1. Once a reference variable has been defined to refer to a particular variable it can refer to any other variable.
2. A reference is not a constant pointer.
A. Only 1 is correct.
B. Only 2 is correct.
C. Both 1 and 2 are correct.
D. Both 1 and 2 are incorrect.
Ans: D - Which of the following statement is correct?
A) The order of the default argument will be right to left.
B) The order of the default argument will be left to right.
C) The order of the default argument will be alternate.
D) The order of the default argument will be random.
Ans: A - Which of the following statement is correct?
A) In C the global version of a variable cannot be accessed from within the inner block.
B) In C the global version of a variable can be accessed from within the inner block.
C) C introduces the scope resolution operator to access global variable.
D) All of these
Ans: A - Which of the following statement is correct?
A) In C the global version of a variable cannot be accessed from within the inner block.
B) In C the global version of a variable can be accessed from within the inner block.
C) C introduces the scope resolution operator to access global variable.
D) All of these
Ans: A