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 difference between read and readline in c#?
why delegate is type safe?
What is event and delegates in c#?
What is ilasm.exe used for?
What is stringbuilder c#?
What is a console device?
Is there an equivalent of exit() for quitting a c# .net application?
What's the difference between an integer and int?
What is use of console?
How do I start a program in c#?
Write a program to find the angle between the hours and minutes in a clock
Why is main static in c#?
What is namespace in oops?
write a program to find the biggest palindrome in the given string
How to Show Message box in Metro Style App?