Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Which of the following are true when using default argument values for parameters? Default arguments must be literals or constants. You cannot specify a variable
- Which of the following are true when using default argument values for parameters?
- Default arguments must be literals or constants. You cannot specify a variable as a default argument.
- You can provide default arguments for all of the parameters in a method. However, when only some of the parameters have a default argument, you must declare the parameters with the default arguments last.
- When a method has several parameters with default arguments and you leave out some of the arguments when you call the method, you have to leave out all the arguments that come after it as well.
2. Does Visual C# provide for static variables in methods?
3. Which of the following is true about passing data from arguments to parameters?
- You can only pass string arguments into string parameters.
- You can pass int arguments into int parameters, but you cannot pass double or decimal arguments to int parameters.
- You can pass either double or int into double parameters, but you cannot pass decimal values into double parameters.
- You can pass either decimal or int arguments to decimal parameters, but you cannot pass double arguments into decimal parameters.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started