C MCQs :- multiple choice questions and answers. e.g C MCQS,C Mock Tests , C Practice Papers ,C Sample Test,C Sample questions

Your Session ID :-Guest9076046

Question 1: A Student class has a property called rollNo and stu is a reference to a Student object and we want the statement stu.RollNo = 28 to fail. Which of the following options will ensure this functionality?

Declare rollNo property with both get and set accessors.

Declare rollNo property with only set accessor.

Declare rollNo property with get, set and normal accessors.

Declare rollNo property with only get accessor.

Total MCQS Questions are 9 in this paper