Search Header Logo

Session 2A

Authored by Mohammad Saleem

Computers

9th - 12th Grade

Used 1+ times

Session 2A
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

1 min • 2 pts

Create a method named MyMethod and call it inside Main().
static void MyMethod() {
  Console.WriteLine("I just got executed!");
}

static void Main(string[] args){
________
}

2.

FILL IN THE BLANK QUESTION

1 min • 2 pts

static void MyMethod(string fname, int age) {
  Console.WriteLine(fname + " is " + age);
}

static void Main(string[] args){
  MyMethod("Liam", 5);
}
Write down the output of this code

3.

FILL IN THE BLANK QUESTION

1 min • 2 pts

static void MyMethod(string txt) {
  Console.WriteLine(txt[1]);
}

static void Main(string[] args){
  MyMethod("Programming");
}
Write down the output of this code


4.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

static int MyMethod(int number) {
  return number + 2;
}

static void Main(string[] args){
  Consol.WriteLine(MyMethod(3));
}
what is the output?


error

5

3

2

5.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

static void MyMethod(int number) {
  number++;
}

static void Main(string[] args){
  Consol.WriteLine(MyMethod(3));
}
what is the output?

error

5

4

3

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?