ExamVeda
Login
Home
Arrays and Strings in C Sharp
?

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;
}

Answer & Solution
Correct Answer: Option C
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.