Review C language (Deep) Day

Start with the basics again go over the C language, laying the groundwork for the UE4 to do, again go over the C programming language freshman learned, at the same time be extended.

Today, the first day of re-learning C, including the following:

Compilation process c language: precompiled (library file expanded, replace macro, remove annotations, conditional compilation (compilation if judgment statement, etc.)); compile (compile code into assembly language); Assembler (assembly language is converted into machine language); link (the link to the previous several generate executable application together).

Before each write, the first to include the import library file, each project should have its main function, but can only have one main function.

c language can perform (via system command all? ) DOS command, the system is a series of operations, such as listed system process (system ( "tasklist")) , kill the QQ process (system ( "taskkill -f -im qq .exe ")), etc.

Notes with C language and JAVA same C #, three-line comment, and the comment block.

--------------------- separator --------------------------- -

Macro definitions:

#include <stdio.h>

#define MAX 5

int main(void)

{

int a[MAX];

int i;

for (i=0;i<MAX;i++) scanf("%d",&a[i]);

return 0;

}

The program defines a custom macro MAX, which is the replacement text 5, before the program starts compiling , Chi macro substitution processor completes operations , the program files so that the MAX are replaced by 5, and the compiler then compile .

 

Guess you like

Origin www.cnblogs.com/stuBlogs/p/11432572.html