A: type()
B: settype()
C: gettype()
D: Type()
举一反三
- 要查看某个变量的数据类型,可使用函数( )。 A: gettype() B: GetType() C: Type() D: type()
- 要查看一个变量的数据类型,可使用函数() A: type() B: gettype() C: GetType() D: Type()
- 查看变量的数据类型,可以使用的函数是( )。 A: isset() B: GetType() C: gettype() D: type()
- 要查看一个变量的数据类型,可以使用函数( ) A: typeof() B: gettype() C: status() D: type()
- 使用settype()函数进行类型转换会改变存储的数据类型。
内容
- 0
基本类型到用户定义类型的转换通过___________实现。 A: 强制转换 B: 用户自定义类型的构造函数 C: 基本类型的转换函数 D: 无法实现
- 1
假设ClassX是类类型标识符,Type为类型标识符,可以是基本类型或类类型,Type_Value为Type类型的表达式,那么,类型转换函数的形式为() A: ClassX::operator Type(Type t){… return Type_Value;} B: friendClassX::operator Type(){… return Type_Value;} C: Type ClassX::operator Type(){…return Type_Value;} D: ClassX::operator Type(){… return Type_Value;}
- 2
假设ClassX是类类型标识符,Type为类型标识符,可以是基本类型或类类型,Type_Value为Type类型的表达式,那么,类型转换函数的形式为() A: AClassX::operator Type(Type t){… return Type_Value;} B: BfriendClassX::operator Type(){… return Type_Value;} C: CType ClassX::operator Type(){…return Type_Value;} D: DClassX::operator Type(){… return Type_Value;}
- 3
智慧职教: ndarray对象的数据类型可以通过type()方法进行转换。
- 4
下列关于类型转换运算符重载的说法中,不正确的是()。 A: 类型转换运算符重载函数无返回值类型 B: 类型转换运算符重载函数有返回值类型 C: 类型转换运算符重载函数不能有参数 D: 类型转换运算符重载函数只能用成员函数实现,不能用友元函数实现