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 is the benefit of using interface in c#?
What are the fundamental oop concepts?
What is difference between constants and read-only?
What is the difference between internal and protected in c#?
How objects are stored in memory?
what is .NET framework architecture ??
What is the example of predicate?
What is executescalar in c#?
What are primitive data types in c#?
What is an assembly qualified name
How many constructors can a class have c#?
What is _viewstart cshtml?
Explain what a diffgram, and a good use for one Define diffgram? How it be used?
Explain the difference between abstract class and interface.
Define delegate in c#?