int i = 1;
int j = 1;
System.Console.WriteLine(i == j);
System.Console.WriteLine(i.ToString() == j.ToString());
System.Console.WriteLine((object)i == (object)j);
Give the sample code above, what is the output to the console?
Answer Posted / sasi
static void Main(string[] args)
{
int i = 1, j = 1;
Console.WriteLine(i + j);
Console.WriteLine("\n" + i.ToString() + j.ToString());
Console.WriteLine("\n"+((object)i==(object)j));
Console.ReadLine();
}
output:-
2
11
false
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
what are windows services?
What do you mean by parsing and how to parse a date time string in c#?
What is the purpose of a namespace?
Overloaded constructor will call default constructor internally?
what class is underneath the sortedlist class?
Are c# strings immutable?
Does hashset allow duplicates c#?
What is class method?
Why generics are used?
how to create crystal reports give one detail example(i want to view age category report) please give suitable example in my small knowledge
How to properly clean up excel interop objects?
If dll and exe files are same it means you can deploy both the files in gac?
how to Create a datagridview control with check box column with 8rows in it, the maximum number of check boxes checked should be 3, when user checks the 4th corresponding message should be displayed and check box should be checked. User can uncheck the checked boxes Note: read-only property should not be used
Can you explain template pattern?
What are boxing and unboxing?