Home / MCQ Bank / Computer
Computer Functions And Methods In C Sharp Difficulty: Medium

What is the purpose of the static keyword when applied to a method in C#?

Select the correct option to test your answer:

More Computer Questions

An array consists of n elements. We want to create a heap using the elements. The time complexity of building a heap will be in order of The maximum number of global symbols a module can define is What will be the output of the following C code? #include <stdio.h> int main() { while () printf("In while loop "); printf("After loop\n"); } Status indicators are located on the What will be the output of the following C# code? class Program { static void Main(string[] args) { String []chars = {"z", "x", "y", "z", "y"}; for (int i = 0; i < chars.Length; ++i) for (int j = i + 1; j < chars.Length; ++j) if(chars[i].CompareTo(chars[j]) == 0) Console.WriteLine(chars[j]); Console.ReadLine(); } }