【单选题】【消耗次数:1】
在下列关于类型转换的描述中,错误的是()
任何形式的构造函数都可以实现数据类型转换。
带非默认参数的构造函数可以把基本类型数据转换成类类型对象。
类型转换函数可以把类类型对象转换为其他指定类型对象。
类型转换函数只能定义为一个类的成员函数,不能定义为类的友元函数。
参考答案:
复制
纠错
相关题目
【判断题】 构造函数用于创建类的实例对象,构造函数名应与类名相同,返回类型为void。
①  正确
②  错误
【单选题】 下列关于类型转换函数的说法,正确的是( )。
①  parseInt(5.89s)的返回值为6
②  parseInt(5.89s)的返回值为NaN
③  parseFloat(36s25.8id)的返回值是36
④  parseFloat(36s25.8id)的返回值是3625.8
【判断题】 原生类中的数据类型均可任意转换。
①  正确
②  错误
【判断题】 可使用toString()把基本数据类型转换为字符串类型?
①  正确
②  错误
【判断题】 数据类型之间的转换可以在任意类型之间进行。
①  正确
②  错误
【单选题】 下列关于类型转换函数的说法,正确的是( )。(选择一项)
①  parseInt(5.89s)的返回值为6
②  parseInt(5.89s)的返回值为NaN
③  parseFloat(36s25.8id)的返回值是36
④  parseFloat(36s25.8id)的返回值是3625.8
【判断题】 强制类型转换运算符的功能是将一个表达式的类型转换为所指定的类型。
①  正确
②  错误
【单选题】 具有转换函数功能的构造函数,应该是()。
①  不带参数的构造函数
②  带有一个参数的构造函数
③  带有两个以上参数的构造函数
④  缺省构造函数
【单选题】 在C语言中,函数的数据类型是指()。
①  函数返回值的数据类型
②  函数形参的数据类型
③  调用该函数时的实参的数据类型
④  任意指定的数据类型
【简答题】 C语言的类型转换有三种方式:[填空1]类型转换、[填空2]类型转换和[填空3]类型转换。
随机题目
【单选题】 Dreams are beautiful. However, to _____ them needs lots of time and work.
①  discover
②  find
③  achieve
④  stop
【单选题】 People____ very much in their ideas.
①  change
②  vary
③  alter
④  transform
【单选题】 — The old man wouldn’ t stay at home for a rest even if it rained. —_____. He would feel sick if he stayed home for one day.
①  So would my grandpa
②  So wouldn’ t my grandpa
③  Neither would my grandpa
④  Nor wouldn’ t my grandpa
【单选题】 The dispute is ____ to be settled for a long time to come.
①  uncertain
②  susceptible
③  impossible
④  unlikely
【单选题】 I cannot read your writing. It is ____.
①  legible
②  illegible
③  eligible
④  intelligent
【单选题】 I caught a____ of the car before it disappeared around the bend.
①  glance
②  glimpse
③  look
④  see
【单选题】 Unless all the members agree to ____ to the plan there may be further development in the course of action.
①  tumble
②  stick
③  come
④  adjust
【单选题】 It was the driver’s ____ that caused him to step on the gas instead of the brake after his car went over the curb.
①  fraud
②  alarm
③  terror
④  panic
【单选题】 It was dark in the cave so she ____ a match.
①  struck
②  hit
③  fired
④  burned
【单选题】 The earnings of women are well below that of men ____ educational differences that are diminishing between the two sexes.
①  although
②  though
③  despite of
④  in spite of