Vidyalelo
C# Programming · Q116

Arrays and Strings in C Sharp

Programming · C# Programming · question 116

Q116

What will be the output of the following C# code? static void Main(string[] args) int a = 5; int b = 0, c = 0; method (a, ref b, ref c); Console.WriteLine(b + " " + c); Console.ReadLine(); static int method(int x, int p, ref int k) p = x + x * x; k = x * x + p; return 0;

A.
30, 55
B.
55, 30
C.
Compile time error
Answer
D.
0, 0

Answer: Option C

Solution

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