C# Programming Functions and Procedures
Quiz
•
Computers
•
Professional Development
•
Easy
Владимир Андреев
Used 4+ times
FREE Resource
Enhance your content in a minute
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.
Similar Resources on Wayground
10 questions
Let's Play Together
Quiz
•
University - Professi...
9 questions
Power BI Introduction and Connecting with Data Sources
Quiz
•
Professional Development
10 questions
Mobile Offline Sync - OutSystems
Quiz
•
Professional Development
10 questions
RabbitMQ Basic
Quiz
•
Professional Development
13 questions
Guess the Retro Computer 1
Quiz
•
KG - Professional Dev...
10 questions
CodeMonkey Platform Management & Resources
Quiz
•
Professional Development
10 questions
INTO Artificial Intelligence
Quiz
•
University - Professi...
10 questions
GUESS THAT WORD IN CYBER!
Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
6 questions
FOREST Self-Discipline
Lesson
•
1st - 5th Grade
7 questions
Veteran's Day
Interactive video
•
3rd Grade
20 questions
Weekly Prefix check #2
Quiz
•
4th - 7th Grade
Discover more resources for Computers
10 questions
Identifying Phishing Emails Quiz
Quiz
•
Professional Development
14 questions
2019 Logos
Quiz
•
Professional Development
7 questions
Tone and Mood Quick Check
Quiz
•
Professional Development
32 questions
Abbreviations and Equivalents
Lesson
•
6th Grade - Professio...
5 questions
11.4.25 Student Engagement & Discourse
Lesson
•
Professional Development
