X

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();

( 5 )  .  1 Rating  .  6 Attempts
25 views   .  0 comments  .   . 

Download Solution PDF
  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.

Give Rating
Report

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

Write Your Comments or Explanations to Help Others
Comments(0)



No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Explore Other Libraries

X




Copyright (c) 2021 TuteeHUB

OPEN APP
Channel Join Group Join