C# Programming Functions and Procedures

C# Programming Functions and Procedures

Professional Development

9 Qs

quiz-placeholder

Similar activities

GO4! Quiz Zeriuz Fundamental GO

GO4! Quiz Zeriuz Fundamental GO

Professional Development

10 Qs

Module 4: Parameters and Return Values

Module 4: Parameters and Return Values

Professional Development

5 Qs

Chapter 6 : JavaScript Functions & Input/ Output

Chapter 6 : JavaScript Functions & Input/ Output

Professional Development

12 Qs

DECI - Week 5 - round

DECI - Week 5 - round

Professional Development

10 Qs

CAD-CAM

CAD-CAM

12th Grade - Professional Development

14 Qs

Basics of Programming

Basics of Programming

Professional Development

9 Qs

CBP - QUIZ 1

CBP - QUIZ 1

Professional Development

5 Qs

Python training series quiz

Python training series quiz

Professional Development

9 Qs

C# Programming Functions and Procedures

C# Programming Functions and Procedures

Assessment

Quiz

Computers

Professional Development

Easy

Created by

Владимир Андреев

Used 4+ times

FREE Resource

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between a function and a procedure in C#?

A function returns a value while a procedure does not.

A function can only be used in object-oriented programming while a procedure can be used in any programming paradigm.

A function can have multiple return statements while a procedure can only have one return statement.

A function and a procedure are the same thing.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you define a procedure in C#?

Use the 'bool' keyword followed by the procedure name and parentheses.

Use the 'void' keyword followed by the procedure name and parentheses.

Use the 'string' keyword followed by the procedure name and parentheses.

Use the 'int' keyword followed by the procedure name and parentheses.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the return type of a function in C#?

int

boolean

float

string

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can a procedure have a return type in C#?

Sometimes

No

Maybe

Yes

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of using parameters in functions and procedures?

Parameters are used to restrict the input values in functions and procedures.

Parameters are used to make the code block more complex and difficult to understand.

Parameters are used to pass values out of the code block in functions and procedures.

The purpose of using parameters in functions and procedures is to pass values into the code block for more flexibility and reusability.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you call a function in C#?

myFunction();

callFunction(myFunction);

executeFunction(myFunction);

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you call a procedure in C#?

By using the keyword 'run'

By using the name of the procedure followed by parentheses

By using the keyword 'invoke'

By using the keyword 'execute'

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between value parameters and reference parameters in C#?

Value parameters pass the actual parameter by value, while reference parameters pass the actual parameter by reference.

Value parameters and reference parameters are the same in C#.

Value parameters pass a copy of the actual parameter, while reference parameters pass the memory address of the actual parameter.

Value parameters pass the memory address of the actual parameter, while reference parameters pass a copy of the actual parameter.

9.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you pass parameters by reference in C#?

Use the 'byref' keyword before the parameter type in the method signature.

Use the 'in' keyword before the parameter type in the method signature.

Use the 'out' keyword before the parameter type in the method signature.

Use the 'ref' keyword before the parameter type in the method signature.