代码空间


摘要(Abstract)

C是一种通用的编程语言,广泛用于系统软件与应用软件的开发。于1969年至1973年间,为了移植与开发UNIX操作系统,由丹尼斯·里奇与肯·汤普逊,以B语言为基础,在贝尔实验室设计、开发出来。 C语言具有高效、灵活、功能丰富、表达力强和较高的可移植性等特点,在程序设计中备受青睐,成为最近25年使用最为广泛的编程语言[2]。当前,C语言编译器普遍存在于各种不同的操作系统中,例如Microsoft Windows、macOS、Linux、Unix等。C语言的设计影响了众多后来的编程语言,例如C++、Objective-C、Java、C#等。 二十世纪八十年代,为了避免各开发厂商用的C语言语法产生差异,由美国国家标准局为C语言订定了一套完整的国际标准语法,称为ANSI C,作为C语言的标准。二十世纪八十年代至今的有关程序开发工具,一般都支持匹配ANSI C的语法。C语言设计目标是提供一种能以简易的方式编译、处理低级存储器、产生少量的机器代码以及不需要任何运行环境支持便能运行的编程语言。C语言也很适合搭配汇编语言来使用。尽管C语言提供许多低级处理的功能,但仍保持良好跨平台的特性,以一个标准规格写出的C语言程序可在许多计算机平台上进行编译,甚至包含一些嵌入式处理器(微控制器或称MCU)以及超级计算机等作业平台。C语言是一个有结构化程序设计、具有变量作用域(variable scope)以及递归功能的过程式语言。 C语言传递参数均是以值传递(pass by value)[3],另外也可以传递指针(a pointer passed by value)。 不同的变量类型可以用结构体(struct)组合在一起。 只有32个保留字(reserved keywords),使变量、函数命名有更多弹性。 部分的变量类型可以转换,例如整型和字符型变量。 透过指针(pointer),C语言可以容易的对存储器进行低级控制。 编译预处理(preprocessor)让C语言的编译更具有弹性。


主题(Topic)

项目(Project)
scanf ruby/scanf ChauMing/nodejs-scanf eliaskosunen/scnlib hisahi/scanf oli-obk/rust-si sjx233/explain-scanf kumarsourav/Simple-Scanf frozen MorganConrad/unformatter work2 Nv = VertexNum; Graph->Ne = 0; for(V = 0; V < Graph->Nv; V ++) { Graph->G[V].FirstEdge = NULL; } printf("输入边的个数:"); scanf("%d", &(Graph->Ne)); if(Graph->Ne) { for(i = 0; i < Graph->Ne; i ++) { scanf("%d %d", &E1, &E2); //插入边 PtrToAdjVNode NewNode; NewNode = (PtrToAdjVNode)malloc (sizeof(struct AdjVNode)); NewNode->AdjV = E2; NewNode->Next = Graph->G[E1].FirstEdge; Graph->G[E1].FirstEdge = NewNode; //无向图,所以还是插入边 NewNode = (PtrToAdjVNode)malloc (sizeof(struct AdjVNode)); NewNode->AdjV = E1; NewNode->Next = Graph->G[E2].FirstEdge; Graph->G[E2].FirstEdge = NewNode; } } return Graph; } void Visit( Vertex V ) { printf(" %d", V); } void BFS ( LGraph Graph, Vertex S, void (*Visit)(Vertex) ) { int queue[11]; //定义一个队列 int l = 0, r = 0; queue[r++] = S; Visit(S); Visited[S] = true; PtrToAdjVNode tmp; while(l != r) //队列不为空 { tmp = Graph->G[queue[l++]].FirstEdge; while(tmp) { Vertex pos = tmp->AdjV; if(!Visited[pos]) { Visit(pos); Visited[pos] = true; queue[r++] = pos; } tmp = tmp->Next; } } } int main() { LGraph G; Vertex S; G = CreateGraph(); scanf("%d", &S); printf("BFS from %d:", S); BFS(G, S, Visit); return 0; }" class="topic-tag topic-tag-link"> 11.5 wuyong66/CString hhuhhu/CTPLearn 0) { fflush (stdin); scanf ("%c", &tentativa[ajuda]); for(j = 0; j < COLUNA; j++) { if (tentativa[ajuda] == jogo[aux][j]) { vetor[j] = tentativa[ajuda]; vencer ++; } else if (jogo[aux][j] == '\0') { break; } else { cont ++; } } if (cont == strlen (jogo[aux])) { vida --; } for (i = 0; i < strlen (jogo[aux]); i++) { printf ("%c ", vetor[i]); } cont = 0; ajuda++; printf ("\t[%d] - CHANCES RESTANTES\n\n", vida); if (vencer == strlen (jogo[aux])) { printf ("\n\t********** VOCE ACERTOU!!! **********\n\n\n"); system ("pause"); break; } if (vida == 0) { printf ("\n\t********** GAME OVER **********\n\n\n"); system ("pause"); } }break; case 2: system ("cls"); printf("\n\n"); for (i = 0; i < LINHA; i++) { printf ("[%d] >>> %s\n", (i + 1), jogo[i]); } printf("\n\n"); system ("pause"); break; case 3: system ("cls"); printf("\n\n\n\t\t************** SOBRE **************\n\n\n"); printf("\t+-------------------------------------------------+\n"); printf("\t| UNIVERSIDADE ESTADUAL DE SANTA CRUZ - UESC |\n"); printf("\t| GRADUACAO: Ciencia da Computacao |\n"); printf("\t| PROGRAMADOR: Bruno dos Santos Padre |\n"); printf("\t| FINALIDADE: criterio de avaliacao |\n"); printf("\t| VERSAO: 1.0 |\n"); printf("\t+-------------------------------------------------+\n\n\n"); system ("pause"); break; case 4: system ("cls"); printf("\n\n\n\t\t***************** AJUDA *****************"); printf("\n\n\n\t+--------------------------------------------------------+\n"); printf ("\t| O objetivo deste game é descobrir uma palavra |\n"); printf ("\t| adivinhando as letras que ela possui. |\n"); printf ("\t| A cada rodada, o jogador ira escolher uma letra |\n"); printf ("\t| que possa fazer parte da palavra. |\n"); printf ("\t| Caso a palavra contenha esta letra, |\n"); printf ("\t| será mostrado em que posicao ela está. |\n"); printf ("\t| caso esta letra não exista na palavra, |\n"); printf ("\t| o jogador perdera uma chance. Se zerar as chances, |\n"); printf ("\t| o jogador estará fora da partida. |\n"); printf("\t+--------------------------------------------------------+\n"); system ("pause"); break; case 0: exit (0); break; default: printf ("\t******** ERRO. TENTE NOVAMENTE!!! ********\n"); } } while (menu_opcao != 5); return 0; }" class="topic-tag topic-tag-link"> Brunozik/JOGO-DA-FORCA-EM-C Cells[P].Info == Legitimate) printf("%d is at position %d.\n", Key, P); else printf("%d is not found. Position %d is returned.\n", Key, P); return 0; }" class="topic-tag topic-tag-link"> daomin-xsy/12.10 with >. File dependencies are displayed in the web page with embedded links, which are implemented in HTML5 with anchor elements: source code file name For each class, we will, optionally, implement outlining, similar to the visual studio outlining feature. To do that we will use the CSS display property, with values: normal or none, to control whether the contents of a div are visible or not. The Code Publisher will be embedded in a mock Repository with almost no functionality except to support publishing of source code as web pages. Specifically you are not expected to provide support for: package checkin or checkout versioning You are expected to support: Dependency analysis of the C++ source code files you will publish, using the analyzer you developed in Project #2. The ability to specify, on the command line, files to be published, by providing command line arguments for path and file patterns. The ability to display any file cited on the command line, by starting a process that runs a browser of your choice, naming the specification of the file you want to display. Note that the CodePublisher project creates a code generator. Its inputs are C++ code and its outputs are HTML code. Requirements: Your CodePublisher Project: (1) Shall use Visual Studio 2015 and its C++ Windows console projects, as provided in the ECS computer labs. (2) Shall use the C++ standard library's streams for all console I/O and new and delete for all heap-based memory management1. (4) Shall provide a Publisher program that provides for creation of web pages each of which captures the content of a single C++ source code file, e.g., *.h or *.cpp. (10) Shall, optionally2 provide the facility to expand or collapse class bodies, methods, and global functions using JavaScript and CSS properties. (2) Shall provide a CSS style sheet that the Publisher uses to style its generated pages and (if you are implementing the previous optional requirement) a JavaScript file that provides functionality to hide and unhide sections of code for outlining, using mouse clicks. (2) Shall embed in each web page's section links to the style sheet and JavaScript file. (4) Shall embedd HTML5 links to dependent files with a label, at the top of the web page. Publisher shall use functionality from your Project #2 to discover package dependencies within the published set of source files. (2) Shall develop command line processing to define the files to publish by specifying path and file patterns. (3) Shall demonstrate the CodePublisher functionality by publishing all the important packages in your Project #3. (5) Shall include an automated unit test suite that demonstrates you meet all the requirements of this project2. That means that you are not allowed to use any of the C language I/0, e.g., printf, scanf, etc, nor the C memory management, e.g., calloc, malloc, or free. This optional requirement will take a significant amount of work to complete successfully. You should get everything else working before attempting this additional effort. This is in addition to the construction tests you include as part of every package you submit." class="topic-tag topic-tag-link"> jashwanth/remote_code_publisher