早教吧作业答案频道 -->其他-->
C#问题~~~1Whichofthefollowingisalegaldeclarationofastring?A.stringfirstName=newjane;B.stringfirstName='jane';C.string[]firstName="jane";D.stringfirstName='j';E.stringfirstName="jane";=========================2.Whic
题目详情
C# 问题~~~
1 Which of the following is a legal declaration of a string?
A. string firstName = new jane;
B. string firstName = 'jane';
C. string[] firstName = "jane";
D. string firstName = 'j';
E. string firstName = "jane";
=========================
2. Which of the following statements is true about a named constant?
A. You must assign a value to a constant when you create it.
B. It must be written with all uppercase letters.
C. You cannot use constants in equations.
D. None of the above
E. All of A, B and C.
==============================
3. Given the below declarations, the result of a/b is:
int a = 45;
int b = 2;
A. 22.5
B. 23
C. 22
D. 1
E. The division is illegal because the result is not a whole number
================================================
4. If a method does not return a value, its return type is:
A. void
B. 0
C. null
D. false
E. nothing
=======================================
5. When calling or invoking a method that accepts parameters, the argument:
A. is always a constant value
B. is always a variable value
C. is always a string
D. can be either a constant or variable value
E. must be a reference variable
===================================
6. In the method header below, message is an example of a(n):
static void sayHello(string message)
A. formal parameter
B. access modifier
C. actual parameter
D. constant value
E. reference parameter
1 Which of the following is a legal declaration of a string?
A. string firstName = new jane;
B. string firstName = 'jane';
C. string[] firstName = "jane";
D. string firstName = 'j';
E. string firstName = "jane";
=========================
2. Which of the following statements is true about a named constant?
A. You must assign a value to a constant when you create it.
B. It must be written with all uppercase letters.
C. You cannot use constants in equations.
D. None of the above
E. All of A, B and C.
==============================
3. Given the below declarations, the result of a/b is:
int a = 45;
int b = 2;
A. 22.5
B. 23
C. 22
D. 1
E. The division is illegal because the result is not a whole number
================================================
4. If a method does not return a value, its return type is:
A. void
B. 0
C. null
D. false
E. nothing
=======================================
5. When calling or invoking a method that accepts parameters, the argument:
A. is always a constant value
B. is always a variable value
C. is always a string
D. can be either a constant or variable value
E. must be a reference variable
===================================
6. In the method header below, message is an example of a(n):
static void sayHello(string message)
A. formal parameter
B. access modifier
C. actual parameter
D. constant value
E. reference parameter
▼优质解答
答案和解析
标注了*的是答案:
//=============================
1 Which of the following is a legal declaration of a string?
A. string firstName = new jane;
B. string firstName = 'jane';
C. string[] firstName = "jane";
D. string firstName = 'j';
E. string firstName = "jane";//*声明字符串就是这样,或者string firstName = new string("jane");
=========================
2. Which of the following statements is true about a named constant?
A. You must assign a value to a constant when you create it.//*常量必须在创建时赋值
B. It must be written with all uppercase letters.//这仅仅是建议,不是必须
C. You cannot use constants in equations.//不能在表达式中使用还要常量干嘛?
D. None of the above
E. All of A, B and C.
==============================
3. Given the below declarations, the result of a/b is:
int a = 45;
int b = 2;
A. 22.5
B. 23
C. 22 //*整型除法小数位自动截断
D. 1
E. The division is illegal because the result is not a whole number
================================================
4. If a method does not return a value, its return type is:
A. void //*方法没有返回值时,返回类型是void
B. 0
C. null
D. false
E. nothing
=======================================
5. When calling or invoking a method that accepts parameters, the argument:
A. is always a constant value
B. is always a variable value
C. is always a string
D. can be either a constant or variable value //*调用方法的时候方法参数值可以是常量也可以是变量
E. must be a reference variable
===================================
6. In the method header below, message is an example of a(n):
static void sayHello(string message)
A. formal parameter //*message在此方法中始终为形式参数
B. access modifier
C. actual parameter //a(n)的结果为实际参数
D. constant value
E. reference parameter //ref string message才可以称为引用参数
//=============================
1 Which of the following is a legal declaration of a string?
A. string firstName = new jane;
B. string firstName = 'jane';
C. string[] firstName = "jane";
D. string firstName = 'j';
E. string firstName = "jane";//*声明字符串就是这样,或者string firstName = new string("jane");
=========================
2. Which of the following statements is true about a named constant?
A. You must assign a value to a constant when you create it.//*常量必须在创建时赋值
B. It must be written with all uppercase letters.//这仅仅是建议,不是必须
C. You cannot use constants in equations.//不能在表达式中使用还要常量干嘛?
D. None of the above
E. All of A, B and C.
==============================
3. Given the below declarations, the result of a/b is:
int a = 45;
int b = 2;
A. 22.5
B. 23
C. 22 //*整型除法小数位自动截断
D. 1
E. The division is illegal because the result is not a whole number
================================================
4. If a method does not return a value, its return type is:
A. void //*方法没有返回值时,返回类型是void
B. 0
C. null
D. false
E. nothing
=======================================
5. When calling or invoking a method that accepts parameters, the argument:
A. is always a constant value
B. is always a variable value
C. is always a string
D. can be either a constant or variable value //*调用方法的时候方法参数值可以是常量也可以是变量
E. must be a reference variable
===================================
6. In the method header below, message is an example of a(n):
static void sayHello(string message)
A. formal parameter //*message在此方法中始终为形式参数
B. access modifier
C. actual parameter //a(n)的结果为实际参数
D. constant value
E. reference parameter //ref string message才可以称为引用参数
看了 C#问题~~~1Whicho...的网友还看了以下:
已知函数f(j)=loga(−j2+aj+中)(a>j,且a≠1).(Ⅰ)当j∈[j,2]时,函数 2020-05-14 …
已知a+b+c=H a+b+e=J a+d+e=K b+c+d=M c+d+e=N 求a=?b=? 2020-05-16 …
C#问题~~~1Whichofthefollowingisalegaldeclarationofa 2020-06-09 …
1、定义一个N*N的矩阵,输出其对角线元素、上三角矩阵和下三角矩阵;2、编程实现N阶方阵的乘法运算 2020-06-10 …
选出下面各项中字音有误的一项:A汲取jí诘佶屈聱牙jí棘手jí诘责jiéB系鞋带jì维系、拘系xì 2020-07-23 …
选出下面各项中字音有误的一项:A汲取jí诘佶屈聱牙jí棘手jí诘责jiéB系鞋带jì维系、拘系xì 2020-07-23 …
1-6排序,右边大于左边下面大于上面表格如ABCDEF为什么我的程序排除不了E=F和B=D的情况#i 2020-10-30 …
已知i+h=10g+c,f+d=f,10b+c+i=10c+d,10f+a+j=10f+e,11b* 2020-10-30 …
英语问题判断下列所给单词[]部分有几种读音1.A.dr[aw]B.[a]llC.fl[oor]D.b 2020-10-31 …
叉乘数学题,非常急1,单位向量a,b,c适合等式a+b+c=0,则a点乘b+b点乘c+a点乘c=?2 2020-11-15 …