早教吧作业答案频道 -->其他-->
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...的网友还看了以下:
几道英语时态检测题1.Heisthemanwho(take)mypen.2.Jane'smothe 2020-04-26 …
用therebe和have的适当形式填空.1Idon't()anytennisballs.2()J 2020-05-14 …
句型转换1.I have known him for 20 years(提问) --------- 2020-05-16 …
1.he must remain in bed for another two days 就划线部 2020-05-17 …
注意:大工11春《大学英语3》在线作业3作业答案谁知道?一、单选题(共15道试题,共90分.)1. 2020-05-21 …
1.初一〈5〉班的同学正在举行为希望工程募捐的时装秀,你也在现场.根据下列要点介绍这次时装秀120 2020-06-21 …
根据句意及首字母提示填空2.Jane’sskirtfeelss.It’sverynice.3.Su 2020-07-07 …
becomeallbutunthinkable中allbut是什么意思?2.Jane’sprese 2020-07-21 …
34.(2.Moreplantsneedairtheyneedwater.A、justasB、asl 2020-10-30 …
1.首字母填词:(T)isthesixthdayofaweek.2.Jane'sparentsare 2020-12-10 …