【判断题】【消耗次数:1】
C语言中全局变量和局部变量不能同名。
正确
错误
参考答案:
复制
纠错
相关题目
【单选题】 局部变量可以隐藏全局变量,那么在有同名全局变量和局部变量的情形时,可以用()提供对全局变量的访问。
①  作用域运算符
②  指针运算符
③  提取运算符
④  插入运算符
【单选题】 当全局变量与函数内部的局部变量同名时,则在函数内部( )。
①  全局变量与局部变量都无效
②  全局变量有效
③  局部变量有效
④  全局变量与局部变量都有效
【单选题】 当全局变量与函数内部的局部变量同名时,则在函数内部( )
①  全局变量与局部变量都无效
②  全局变量有效
③  局部变量有效
④  全局变量与局部变量都有效
【单选题】 如果局部变量和成员变量同名,如何在局部变量作用域内引用成员变量?( )
①  不能引用,必须改名,使它们的名称不相同
②  在成员变量前加 this,使用 this 访问该成员变量
③  在成员变量前加 super,使用 super 访问该成员变量
④  不影响,系统可以自己区分
【判断题】 C语言中变量是不能重复赋值的
①  正确
②  错误
【判断题】 编码时尽量多用全局变量。()
①  正确
②  错误
【单选题】 下述是C语言中有关变量定义的几个说法,正确的是:()
①  变量可以不定义直接使用
②  一个说明语句只能定义一个变量
③  几个不同类型的变量可在同一语句中定义
④  变量可以在定义时进行初绐化
【单选题】 C++语言中所有在函数中定义的变量,连同形式参数,都属于()
①  全局变量
②  局部变量
③  静态变量
④  函数
【单选题】 在C语言中,下列变量名称中合法的是()
①  7x
②  int
③  ELse
④  a-b
【判断题】 对于一个返回值为指针的函数,能返回auto型局部变量的地址,但不能返回static型变量的地址。
①  正确
②  错误
随机题目
【单选题】 This house will probably come on the _____next month.
①  fair
②  market
③  shop
④  store
【单选题】 The sight of the fruit salad made our daughter Kit’s mouth _____.
①  wet
②  water
③  soak
④  taste
【单选题】 The old lady _____and fell from the top of the stairs to the bottom.
①  slided
②  slipped
③  split
④  spilled
【单选题】 She put an extra blanket over the baby for fear that _____.
①  he catches cold
②  he should catch cold
③  he caught cold
④  he be catching cold
【单选题】 _____ that it was going to rain, he took a raincoat with him.
①  Seeing
②  Saw
③  Seen
④  To see
【单选题】 The disappearance of her paper has never been _____.
①  counted for
②  looked up
③  accounted for
④  checked up
【单选题】 The boy has admitted to _____the window while playing football yesterday.
①  breaking
②  having been broken
③  break
④  be breaking
【单选题】 The millions of circulations involved, _____ by hand, would have lost all practical value by the time they were finished.
①  had they been done
②  they had been done
③  having been done
④  they were done
【多选题】 矛盾同一性在事物发展中的作用表现是什么?
①  矛盾双方在相互依存中得到发展
②  矛盾双方相互吸取有利于自身发展的因素
③  调和矛盾双方的对立
④  规定事物发展的基本趋势
【多选题】 价值具有什么特性?
①  客观性
②  主体性
③  社会历史性
④  多维性