- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
Which of the following statements is correct about the C#.NET code snippet given below?

int i;
int j = new int();
i = 10;
j = 20; 
String str; 
str = i.ToString(); 
str = j.ToString();

1.This is a perfectly workable code snippet.

2.Since int is a primitive, we cannot use new with it.

3.Since an int is a primitive, we cannot call the method ToString() using it.

4.i will get created on stack, whereas j will get created on heap.

Posted Date:-2021-02-25 10:32:15


More MCQS Questions and answers

Search