Q1_OOP

Q1_OOP

University

20 Qs

quiz-placeholder

Similar activities

Building Information Modelling (BIM) Quiz

Building Information Modelling (BIM) Quiz

University

20 Qs

NeuroNex'25 Round 1

NeuroNex'25 Round 1

University

20 Qs

Mastering Python Control Flow

Mastering Python Control Flow

University

15 Qs

Java Basics Quiz for CH/PT Students

Java Basics Quiz for CH/PT Students

University

16 Qs

Python: operadores y tipos de datos

Python: operadores y tipos de datos

University

18 Qs

2F-3 | Python Quiz | 22/11/2024

2F-3 | Python Quiz | 22/11/2024

University

19 Qs

11-р анги

11-р анги

11th Grade - University

20 Qs

Ulangan Harian Kelas XI

Ulangan Harian Kelas XI

2nd Grade - University

20 Qs

Q1_OOP

Q1_OOP

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Medium

Created by

Joana Reyes

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A method in C# is primarily used to:

Store data

Encapsulate code to perform tasks

Declare variables

Format output

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What’s the correct way to call a method named sayHello()?

sayHello;

sayHello()

sayHello[]

call sayHello()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the simple sayHello() example, how many times is sayHello() called?

1

2

3

0

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword is used to make a method return a value?

exit

stop

return

yield

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If add(int a, int b) returns the sum, what’s the return type?

void

int

string

float

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an example of method overloading?

Defining two methods with the same name but different parameters

Using static and public modifiers together

Calling a method from another method

A method that returns another method

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when subtract(2, 5) is called in the example?

Outputs 7

Outputs -3

Outputs 5

Outputs 2

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?