当前位置:网站首页>C language Getting Started Guide

C language Getting Started Guide

2022-07-06 13:29:00 Mr. 30000 lines

List of articles

Chapter two C Language learning framework and simple code



Preface

With C Language learning tools this chapter will build a C Language learning framework


One 、C Language content

C The content of language is simply classified as follows :

 1. keyword       2. The operator         3. Branch and loop statements           4. function            5. Array           6. The pointer

 7. Structure        8. File operations

( Keywords and operators will be explained in specific code blocks )

Two 、 Simple code

1. Simple input and output

The code is as follows ( Example ):

#include <stdio.h>

int main()
{
	printf("hallo");
	return 0;
}

Code block parsing : 

 

As shown in figure, 1.

stay C The language program must contain a main function, that is main function , because C Language programs start from mian Function to , Also in main End of the function , The lack of main Function programs cannot be executed , all main The importance of functions is self-evident . 

As shown in figure, 2. 

printf Is an output function using printf You can print the contents in double quotation marks on the screen, and the results are as follows :

 

 


summary

All procedures are from main Function to , from main End of the function

原网站

版权声明
本文为[Mr. 30000 lines]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060916400945.html