Q1_OOP

Q1_OOP

University

20 Qs

quiz-placeholder

Similar activities

Basic HTML

Basic HTML

University

20 Qs

Professionalism in Robotics Engineering Final Assessment

Professionalism in Robotics Engineering Final Assessment

9th Grade - University

20 Qs

Python Library Routines Quiz

Python Library Routines Quiz

10th Grade - University

18 Qs

Code Camp Quiz 2025 V1

Code Camp Quiz 2025 V1

6th Grade - University

20 Qs

Security Fundamental

Security Fundamental

University

20 Qs

NISS-DC-Quiz

NISS-DC-Quiz

University

15 Qs

Advanced Java UNIT-2(J2EE)-Quiz-4

Advanced Java UNIT-2(J2EE)-Quiz-4

University

20 Qs

Python

Python

University

20 Qs

Q1_OOP

Q1_OOP

Assessment

Quiz

Information Technology (IT)

University

Medium

Created by

Joana Reyes

Used 1+ times

FREE Resource

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

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?