Dive into the essentials of C# programming with this trivia quiz! Test your knowledge on method creation, method characteristics, and code output analysis. Perfect for learners aiming to enhance their programming skills in C#.
Methods are easily reusable.
Because all methods must be stored in the same class, they are easy to find
The Main() method becomes more detailed.
All of these are true.
Rate this question:
Return type
Parameter list
Body
Closing brace
Rate this question:
A = 5, b = 10
A = 10, b = 5
A = 10, b = 10
A = 5, b = 5
Rate this question:
A statement of purpose
Declared accessibility
The static modifier
A return type (even void) a return type (even void)
Rate this question:
Unlimited
Static or static public
Shared
Unrestricted
Rate this question:
Can be called without referring to an object or class
Cannot be copied
Can be called only once
Cannot require parameters
Rate this question:
Accessibility
Parameter type
Return type
Scope
Rate this question:
Scope management
Selective ignorance
Privacy
Implementation hiding
Rate this question:
A pair of parentheses
The type of the parameter
A local name for the parameter
An initial value for the parameter
Rate this question:
AMethod(int 55);
AMethod(myAge);
AMethod(int myAge);
AMethod(int myAge);
Rate this question:
Must contain a declared double named rate
Might contain a declared double named rate
Cannot contain a declared double named rate
Cannot contain any declared double variables
Rate this question:
Formal
Actual
Propsed
Preferred
Rate this question:
Salary
Any legal identifier other than salary
Any legal identifier
Omitted
Rate this question:
Static public void CalcDifference(double price1, price2)
Static public void CalcDifference(double price1, double price2)
Both of these are correct.
None of these are correct.
Rate this question:
Static public void CalcSum(double firstValue, double secondValue)
Static public void CalcSum(double price1, double price2)
Both of these are correct.
None of these are correct.
Rate this question:
The finally block is executed only if an exception is thrown and handled in the try block.
The finally block is executed only if the catch block is executed.
The finally block is executed regardless of whether an exception is thrown or not, and it executes after the try and catch blocks.
The finally block can be skipped if the try block contains a return statement.
Rate this question:
Only the method isRateOK() executes.
Only the method isQuantityOK() executes.
Both methods execute.
Neither method executes.
Rate this question:
Only the method isRateOK() executes.
Only the method isQuantityOK() executes.
Both methods execute.
Neither method executes.
Rate this question:
Reference
Value
Alias
Orientation
Rate this question:
Selection
Loop
Sequence
Array
Rate this question:
A single statement
A block of statements within curly braces
Either a or b
Neither a nor b neither a nor b neither a nor b neither a nor b
Rate this question:
While
For
Counted
Infinite
Rate this question:
It is initialized before the loop starts.
It is tested.
It is reset to its initial value before the loop ends.
It is altered in the loop body.
Rate this question:
Loop control variable
Statements
Curly braces
Test within the parentheses of the while statement
Rate this question:
Definite loop
Indefinite loop
Counted loop
For loop
Rate this question:
With a for loop, it is impossible to create an infinite loop.
It is the only way to achieve an indefinite loop.
Unlike with a while loop, the execution of multiple statements can depend on the test condition.
The loop control variable is initialized, tested, and altered all in one place.
Rate this question:
Two semicolons (;)
Three commas (,)
Four dots (.)
Five pipes (|)
Rate this question:
Once
Once prior to each loop iteration
Once after each loop iteration
One less time than the initial loop control variable value
Rate this question:
Testing, outputting, and incrementing
Initializing, testing, and incrementing
Incrementing, selecting, and testing
Initializing, converting, and outputting
Rate this question:
A do loop
A while loop
A for loop
An if loop
Rate this question:
A while loop
A do loop
A for loop
All of the above
Rate this question:
Untested
Pretest
Posttest
Infinite
Rate this question:
Untested
Pretest
Posttest
Infinite
Rate this question:
Infinite
Bubbled
Nested
Overlapping
Rate this question:
1 2 3 4
1
4
Compiler Error
Rate this question:
1
234
1234
4
Rate this question:
0
5
54321
543210
Rate this question:
0
012
3
Compiler Error
Rate this question:
0
01
012
01234
Rate this question:
Quiz Review Timeline (Updated): Sep 1, 2024 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.