【单选题】【消耗次数:1】
当全局变量与函数内部的局部变量同名时,则在函数内部( )
全局变量与局部变量都无效
全局变量有效
局部变量有效
全局变量与局部变量都有效
参考答案:
复制
纠错
相关题目
【单选题】 当全局变量与函数内部的局部变量同名时,则在函数内部( )。
①  全局变量与局部变量都无效
②  全局变量有效
③  局部变量有效
④  全局变量与局部变量都有效
【单选题】 局部变量可以隐藏全局变量,那么在有同名全局变量和局部变量的情形时,可以用()提供对全局变量的访问。
①  作用域运算符
②  指针运算符
③  提取运算符
④  插入运算符
【判断题】 C语言中全局变量和局部变量不能同名。
①  正确
②  错误
【单选题】 如果局部变量和成员变量同名,如何在局部变量作用域内引用成员变量?( )
①  不能引用,必须改名,使它们的名称不相同
②  在成员变量前加 this,使用 this 访问该成员变量
③  在成员变量前加 super,使用 super 访问该成员变量
④  不影响,系统可以自己区分
【判断题】 编码时尽量多用全局变量。()
①  正确
②  错误
【单选题】 凡是函数中未指定存储类别的局部变量,其隐含的存储类别为( )。
①  自动(auto)
②  静态(static)
③  外部(extern)
④  寄存器(register)
【判断题】 对于一个返回值为指针的函数,能返回auto型局部变量的地址,但不能返回static型变量的地址。
①  正确
②  错误
【单选题】 PHP中存在多种变量,其中在函数内部定义的变量称之为( )。
①  变量
②  局部变量
③  全局变量
④  内部变量
【单选题】 PHP中存在多种变量,其中在函数内部定义的变量称之为( )。
①  变量
②  局部变量
③  全局变量
④  内部变量
【单选题】 PHP中存在多种变量,其中在函数外定义的变量称之为( )。
①  局部变量
②  变量
③  超全局变量
④  全局变量
随机题目
【单选题】 —Imafraidhisradioistoonoisy.Willyouplease_____himtoturnitdown?—Sure.
①  make
②  let
③  ask
④  keep
【单选题】 IfIhad_______,I’dvisitEurope,stoppingatallthesmallinterestingplaces.
①  alongenoughholiday
②  anenoughlongholiday
③  aholidayenoughlong
④  alongholidayenough
【单选题】 ---MarryChristmas!---___________.
①  Oh,thankstoyou!
②  HappyNewYear!
③  Thesametoyou!
④  Inevercelebrateit!
【单选题】 Itisover_______fromShijiazhuangtoBeijing.
①  threehoursdrive
②  threehoursdrive
③  threehoursdrives
④  threehoursdrive
【单选题】 Mr.Yangisverybusy.He_____twelvehoursaday.Hewillcallyouassoonashe___back.
①  works;gets
②  isworking;get
③  works;isgetting
④  isworking;willget
【单选题】 Thelawrequiresthatallthecarowners____theircarstestedtwiceayear.
①  has
②  have
③  had
④  willhave
【单选题】 Dobecareful!Themanishard________.
①  dealingwith
②  tobedealtwith
③  todealwith
④  fordealingwith
【单选题】 ─Doyouknowthewomanoverthere?─Yes,Shes_______aunt?
①  TimandTom
②  TimsandTom
③  TimsandTom
④  TimandToms
【单选题】 TodayTomgoestoschoolearlierthan_______.
①  asusual
②  usual
③  usually
④  ago
【单选题】 Jacklikesto_____othersbutneverwritestothem.
①  hearof
②  hearabout
③  hearfrom
④  hear