What will be the value of result after these two statements?
int num1 = 10, num2 = 9;
int result = num1 ^ num2;
Correct Answer: 3
Explanation:
Note: This Question is unanswered, help us to find answer for this one
C# Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More C# MCQ Questions
What will be the output of the following Main program in a C# console application (Assume required namespaces are included)? static void Main(string[] args) { string sPrint = String.Format('{{ My name is bond. }}'); Console.WriteLine(sPrint); Console.ReadLine(); }
What is the difference between data types 'System.String' and 'string' in C#?
Which of the following is the correct code to close all references to the com objects below? Workbooks books = excel.WorkBooks; Workbook book = books[1]; Sheets sheets = book.WorkSheets; Worksheet ws = sheets[1];
Which of the following is the correct way to sort a C# dictionary by value?
Consider the following code: public class ClassPoint { public int X; public int Y; public ClassPoint(int a, int b) { X = a; Y = b; } } public struct StructPoint { public int X; public int Y; public StructPoint(int a, int b) { X = a; Y = b; } } public class Test { static void Main(string[] args) { ClassPoint a = new ClassPoint(10, 10); ClassPoint b = a; a.X = 100; StructPoint c = new StructPoint(10, 10); StructPoint d = c; c.X = 100; Console.WriteLine(b.X.ToString() + ',' + d.X); } } What will be the output printed on the screen?
What will be the result of the following code ? public static void Main() { try { var s = '200'; var i = int.Parse(s); if (i == 200) Environment.FailFast("i is equal to 200"); } catch (Exception ex) { Console.WriteLine(ex.Message); } finally { Console.WriteLine('done!'); } }
Flowing the code below: int a = 5, b = 10, c = 15; int result = 0; result = a
what are the strengths of a SortedSet
A delegate inherits from:
What is the result of the following code ? public static void Main() { Derived2 d = new Derived2(); Console.WriteLine(d.GetTempValue()); } public class BaseClass { public virtual int GetTempValue() { return 1; } } public class Derived1 : BaseClass { public sealed override int GetTempValue() { return 2 * base.GetTempValue(); } } public class Derived2 : Derived1 { public sealed override int GetTempValue() { return 2 * base.GetTempValue(); } }