• 2022-06-03
    以下自定义数据类型的语句中,正确的是
    A: A.Type student ID As String * 20 name As String * 10 age As Integer End student
    B: B.Type student ID As String * 20 name As String * 10 age As Integer End Type
    C: C.Type student ID As String name As String age As Integer End student
    D: C.Type ID As String * 20 name As String * 10 age As Integer End Type student
  • B

    举一反三

    内容

    • 0

      以下能正确定义数据类型TelBook的代码是: A: Type TelBook Dim Name As String * 10 Dim TelNum As IntegerEnd Type B: Type TelBook Name As String * 10 TelNum As IntegerEnd Type C: Type TelBook Name As String * 10 TelNum As IntegerEnd TelBook D: Type TelBook Name As String * 10 TelNum As IntegerEnd Type TelBook

    • 1

      下列( )方法定义和调用的代码是正确的。 A: static void Introduce(string gender = "男", string name, int age = 18){} Introduce(name: "alex", age: 20); B: static void Introduce(string name, int age = 18, string gender = "男"){} Introduce(age: 20, name: "alex"); C: static void Introduce(string gender = "男", string name, int ago = 18){} Introduce(age: 20, name: "alex"); D: static void Introduce(string name, int age = 18, string gender = "男"){}Introduce(name: "alex", age: 20);

    • 2

      下面程序运行的结果是 struct Student { public int age; public string name; public Student(int age, string name) { this.age = age; this.name = name; } } class Program { static void Main(string[] args) { Student stu1 = new Student(18, "小方"); Student stu2 = new Student(24, "小刚"); stu2 = stu1; stu1.age = 30; stu1.name = "小燕"; Console.WriteLine("{1},{0}",stu2.age,stu2.name); } }

    • 3

      已知函数getStudent()定义为public Student getStudent(int ID),下列四个选项中可以与getStudent构成重载的方法是 A: private Student getStudent(int ID) B: public String getStudent(int ID) C: Student getStudent(String name) D: public Student get(int ID)

    • 4

      在窗体的通用声明段自定义了数据类型Students,下列_____定义方式是正确的。 A: TypeStudents Name String*10 Studno IntegerEnd Type B: Private Type Students Name AsString*10 Studno AsInteger End Type C: Type Students Name AsString*10 Studno AsIntegerEnd Students D: Type Students Name As String*10 Studno AsIntegerEnd Type