A Test for The C Programming Language
I. History
1. C was originally designed for and implemented on the (what) operating system on the DEC PDP-11, by (who) .
2. The most recently approved ANSI/ISO C standard was issued in (when), and single line comments notation “//” is or isn’t a feature of C89.
II. Syntax and Semantics 1.In a runtime C program, auto variables are stored in , staticvariables are stored in , and function parameters are stored in .
a. stack b. heap c. neither stack nor heap
2. The statement “extern int x;” is a , and the keyword extern is used during .
a. variable declaration b. variable definition c. compilation time d. runtime
3. There is a complicated declaration: void ( * signal (int, void(*)(int)) ) (int);If a statement “typedef void (*p) (int);” is given,please rewrite this complicated declaration.
4. The following code is a segment of C program.
..........
void func(int *p)
{...........}
..........
main()
{
int num=0;
.........
func(&num);
........
}
..........
Here, the function argument “&num” is passed .
a. by value b. by reference
III. Practice
Create a tree, which has h (h>0) layers, and its each node has w(w>0) sub-nodes.Please complete the following incomplete solution.
#include
#include
struct tree{
char info;
p_sub; //link to sub-nodes};
// allocate memory and initiate
void dnode ( struct tree* tmp )
{
= malloc( sizeof (struct tree) );
= 0x41;
= NULL;
}
struct tree *dtree (struct tree* subtree, int height, int width)
{
int i;
if ( !subtree ) //if necessary, allocte memory for subtree
denode(subtree);
if ( height == 1 )
return subtree;
else if ( height == 2 ) {
struct tree *leaf = NULL;
for ( i=0; i
denode ( );
;
leaf = NULL;}
return subtree;}
else {
for ( i=0; i
}
return subtree;
}
}
main()
{
.........
struct tree *root = NULL
金山職業技術學院對比四川汽車職業技術學院哪個好 附分..
時間:2025-05-22 09:08:12成都銀杏酒店管理學院在重慶高考招生計劃人數和專業代..
時間:2025-05-22 09:05:01四川上山東理工大學多少分 分數線及排名
時間:2025-05-22 09:01:18江西高考理科533分排名多少 排名多少位次
時間:2025-05-22 08:57:21大連東軟信息學院對比甘肅民族師范學院哪個好 附分數線..
時間:2025-05-22 08:53:39廣東高考455至460分左右物理可以上什么大學
時間:2025-05-22 08:49:52
中國點擊率最高的一篇文章 !2023-08-13 03:45:29
海南上長春工業大學多少分 分數線及排名2025-05-22 09:28:45
科爾沁藝術職業學院對比山東水利職業學院哪個好 附分數線排名2025-05-22 09:25:00
呼和浩特職業學院對比山西警官職業學院哪個好 附分數線排名2025-05-22 09:22:04
四川工程職業技術學院在上海高考招生計劃人數和專業代碼(參考)2025-05-22 09:19:52
泰山科技學院對比西安理工大學高科學院哪個好 附分數線排名2025-05-22 09:16:28
江西航空職業技術學院在云南高考招生計劃人數和專業代碼(參考)2025-05-22 09:13:20
遼寧特殊教育師范高等專科學校對比江西工商職業技術學院哪個好 附分數線排名2025-05-22 09:10:51
國美電器天津筆試題和面試題答案2023-08-19 07:02:30
德固賽的筆試題和面試題答案目及分析2023-08-24 19:59:08
普康數碼科技工程師筆試題和面試題答案2023-08-19 12:27:43 




