Question: Question 6 Which of the following is an 8-byte Integer? Char Long Short Byte Integer Which of the following is correct way to convert

 Question 6 Which of the following is an 8-byte Integer? Char Long
Short Byte Integer Which of the following is correct way to convert
a String to an int? 1. strings "123"; int i; i- (int);
2. strings "123"; int i; i int.Parse(s); 3. strings "123"; int i;
i Int 32.Parse(s); 4. strings "123"; int i; i Convert.ToInt32(s); 5. strings

Question 6 Which of the following is an 8-byte Integer? Char Long Short Byte Integer Which of the following is correct way to convert a String to an int? 1. strings "123"; int i; i- (int); 2. strings "123"; int i; i int.Parse(s); 3. strings "123"; int i; i Int 32.Parse(s); 4. strings "123"; int i; i Convert.ToInt32(s); 5. strings "123"; int i; iCInt(s); O 1,3,5 0 2,4 O 3,5 O2,3,4 Question 10 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? O Declare rollNo property with both get and set accessors. O Declare rollNo property with only set accessor. O Declare rollNo property with get, set and normal accessors. O Declare rollNo property with only get accessor. O No answer text provided. Question 11 An Employee class has a property called age and emp is reference to an Employee object and we want the statement Console.WriteLine(emp.age) to fail. Which of the following options will ensure this functionality? 1.82 pts O Declare age property with only get accessor. O Declare age property with only set accessor. O Declare age property with both get and set accessors. 1.82 pts Question 25 Which of the following will be the correct output for the C#.NET code snippet given below? string s1 "ALL MEN ARE CREATED EQUAL"; string s2; 52 = s1.Substring(12, 3); Console.WriteLine(s2); ARE CRE O CR REA O CREATED Question 30 If the Sample class has a Length property with get and set accessors then which of the following statements will work correctly? 1. Sample.Length = 20; 2. Sample m = new Sample(); m.Length = 10; 3. Console.WriteLine(Sample.Length); 4. Sample m= new Sample(); int len; len-m.Length; 5. new Sample0: Sample m m.Length m.Length + 20; O1 only 01.3 O2,4,5 O4 only 0 3,5 1.82 pts

Step by Step Solution

3.43 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The detailed answer for the above question is provided below 6 The ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!