Vidyalelo
C# Programming · Q85

Classes and Objects in C Sharp

Programming · C# Programming · question 85

Q85

What will be the output of the following C# code? class maths static maths() int s = 8; Console.WriteLine(s); public maths(int f) int h = 10; Console.WriteLine(h); class Program static void Main(string[] args) maths p = new maths(0); Console.ReadLine();

A.
10, 10
B.
0, 10
C.
8, 10
Answer
D.
8, 8

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board