Home / MCQ Bank / Computer
Computer Classes And Objects In C Sharp Difficulty: Medium

What will be the output of the following C# code? class maths { public int fun(int k, int y) { return k + y; } public int fun1(int t, float z) { return (t+(int)z); } } class Program { static void Main(string[] args) { maths obj = new maths(); int i; int b = 90; int c = 100; int d = 12; float l = 14.78f; i = obj.fun(b, c); Console.WriteLine(i); int j = (obj.fun1(d, l)); Console.WriteLine(j); Console.ReadLine(); } }

Select the correct option to test your answer:

More Computer Questions

What will be the output of the following Java code? class newthread implements Runnable { Thread t; newthread() { t1 = new Thread(this,"Thread_1"); t2 = new Thread(this,"Thread_2"); t1.start(); t2.start(); } public void run() { t2.setPriority(Thread.MAX_PRIORITY); System.out.print(t1.equals(t2)); } } class multithreaded_programing { public static void main(String args[]) { new newthread(); } } The ______ function is used to read a single character from a file. Which of the following is a valid way to create an infinite loop in Java? Short cut Ctrl + R is used to What is the purpose of the 'std::priority_queue' container in C++ STL?