| 9. | How many times can a constructor be called during lifetime of the object?
|
|||||||||
Answer: Option B Explanation: No answer description available for this question. Let us discuss.
|
| 10. | Which of the following statements are correct about constructors in C#.NET? 1 Constructors cannot be overloaded. 2 Constructors always have the name same as the name of the class. 3 Constructors are never called explicitly. 4 Constructors never return any value. 5 Constructors allocate space for the object in memory. |
|||||||||
Answer: Option B Explanation: No answer description available for this question. Let us discuss.
|
| 11. | Can static procedures access instance data?
|
|||
Answer: Option B Explanation: No answer description available for this question. Let us discuss.
|
| 12. | In which of the following should the methods of a class differ if they are to be treated as overloaded methods? 1 Type of arguments 2 Return type of methods 3 Number of arguments 4 Names of methods 5 Order of arguments |
|||||||
Answer: Option C Explanation: No answer description available for this question. Let us discuss.
|
| 13. | Which of the following is the correct way to define the constructor(s) of the Sample class if we are to create objects as per the C#.NET code snippet given below? Sample s1 = new Sample(); |
|||||||||
Answer: Option A Explanation: No answer description available for this question. Let us discuss.
|
| 14. | Which of the following statements is correct about constructors?
|
|||||||
Answer: Option D Explanation: No answer description available for this question. Let us discuss.
|
| 15. | Which of the following statements are correct about static functions? 1 Static functions can access only static data. 2 Static functions cannot call instance functions. 3 It is necessary to initialize static data. 4 Instance functions can call static functions and access static data. 5 this reference is passed to static functions. |
|||||||||
Answer: Option A Explanation: No answer description available for this question. Let us discuss.
|
| 16. | Which of the following ways to create an object of the Sample class given below will work correctly? class Sample |
|||||||||
Answer: Option D Explanation: No answer description available for this question. Let us discuss.
|
