aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • .NET Framework and ASP.NET Fundamentals
  • Predict the correct output of the code given below: ```cs...
Multiple choice

Predict the correct output of the code given below:

using System;
class Program {
 static void Main(string[] args) {
  Byte[] numbers = {
   10,
   20,
   30,
   40
  };
  Console.Write(numbers[1]);
  Console.ReadLine();
 }
}

  1. 10

  2. 20

  3. 30

  4. 0

  5. Compilation error

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

This is the correct output.

Keep practicing — related questions

  • Identify the output of the code given below: # using System; class Program { static void Main(string[] args...
  • Identify the output of the code given below: using System; class Demo1 { public void X() { Console.WriteLin...
  • Identify the output of the code: class Site { static void Main(string[] args) { int a; Site(out a); Console...
  • What will be output of following code ? 1 public class Main { 2 public static void main(String[] args) { 3 ...
  • What will be the output of the following code? class Demo { static void Main(string[] args) { int a = 3; Si...
  • Identify the correct output of the code given below: using System; class welcome { static void Main(string[...
  • Find out the output for the code snippet given below:- int i=10; Console.WriteLine(i++);
  • Find out the output of the given program. #include #include main() { int s = 25, d; d = s % 10; if (d == 5)...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy