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 8 bit signed integer?
What does using do in c#?
What is the difference between a variable and a literal?
Why does my windows application pop up a console window every time I run it?
How do I port "synchronized" functions from visual j++ to c#?
Explain dataadapter.update method in .net?
What is dependency injection in simple words?
What sort algorithm does c# use?
Is a valid int value?
Explain the Different types of configuration files in .net?
What is an escape sequence in c#?
Is null == null c#?
Why would you use untrusted verification?
What is the components of window?
What is the meaning of 0 in c#?