表示变量或者函数的定义在别的文件中,提示编译器遇到比变量和函数时在其它模块中查找,其定义的关键字是
A: extern
B: static
C: define
D: typedef
A: extern
B: static
C: define
D: typedef
举一反三
- C语言中()可以置于变量或者函数前,以表示变量或者函数的定义在别的文件中,提示编译器遇到此变量和函数时在其他模块中寻找其定义。 A: typedef B: ifdef C: define D: extern
- 在函数中,定义一个变量时,默认的存储类型是 A: extern B: auto C: register D: static
- 当函数调用结束时,该函数中定义的 变量占用的内存不收回,其存储类别的关键字为static
- 要引用一个在其他模块定义的变量或函数,必须声明该变量或函数在其他模块被定义,用关键字(1)声明;在本模块定义的全局变量或函数,如果不希望被其他模块使用,用关键字(2)声明;函数里面定义的变量,默认的生命周期是从函数调用开始,到函数返回结束,即调用该函数时,编译系统给变量分配空间,函数返回,空间被编译系统回收。若希望函数返回时,函数内部变量的空间和值被保留,用关键字(3)声明。
- 在一个函数体中,定义一个变量的默认存储类型是______。 A: extern B: register C: auto D: static