Home / MCQ Bank / Computer
Computer Miscellaneous In C Sharp Difficulty: Medium

What will be the output of the following C# code snippet? class UnsafeCode { static void Main() { int? count = null; int? result = null; int incr = 10; result = count + incr; if (result.HasValue) Console.WriteLine("result has this value: " + result.Value); else Console.WriteLine("result has no value"); Console.ReadLine(); } }

Select the correct option to test your answer:

More Computer Questions

What will be the output of the following C code? #include <stdio.h> int main() { int x = 1, y = 2; int z = x & y == 2; printf("%d\n", z); } The main elements of the __________ are the insertion point, end mark, mouse pointer, rulers, scroll bars, and status bar. What is the purpose of the Hadoop Secondary NameNode? What will be the co-ordinates of foot of perpendicular line drawn from the point (-1,3) to the line 3x-4y-16=0? What will be the output of the following C++ code? #include <iostream> #include <string> using namespace std; class A{ int a; public: A(int i){ a = i; } void assign(int i){ a = i; } int return_value(){ return a; } }; int main(int argc, char const *argv[]) { A obj; obj.assign(5); cout<<obj.return_value(); }