C Language High-speed entry series (i)

Source: Internet
Author: User

C Language High-speed entry series (i)


Introduction to this series:

The purpose of this tutorial is to get the content of the C language entry to the key points of knowledge purification, some general nonsense to remove;

Then compression, and then the key points of knowledge in this chapter into the road map, it is more convenient to grasp the direction of learning;

Finally, the relevant code demonstration sample and specific gaze can help the scholar to get started with C language faster!

If you have any suggestions and shortcomings for this tutorial, please note that it is appreciated!



Learning Roadmap for this section:





Body:



1. The relationship between the computer and the programming language:

A: The computer is composed of hardware and software system, hardware ==> material base; software ==> Soul;

If you leave the software, the computer is just a bare metal that nothing can do;

Able to visually understand the adult brain and body, indispensable!




2. The upgrading of programming languages:




features of the 3.C language




4. First HelloWorld program:

PS: Most programming languages start out with how to print out HelloWorld! Although the simplest procedure;

Small, perfectly formed, a little HelloWorld includes a lot of things that you may not understand now;

When you learn the back, and then look at this Hello world, you will have more profound experience!

Here we temporarily interpret him as a format! That's what it says. It will output XXX!


#include <stdio.h>int main () {printf ("Hello world!\n"); return 0;}


Here is a simple code, not a related gaze; you know this code can output Hello world! You can do it!

After you have finished using the compiler. You write your own program, remember to knock yourself, do not paste code directly, read not necessarily write out.

According to write it right, then don't look at the code, write it again, remember, programming avoid above his business!



conversion process for 5.C language programs


Note: ① When we write the code in the compiler, this time the file is hello.c,. c is the C language program source suffix, at this time the program called the source program!

② when the program compiles through the compiler, a target program (binary code file) is generated

③ the target program and library files linked to a machine code file, EXE can run the program!

④ Click to execute, output results!


use of the 5.IDE development environment:

(choose one in vc++6.0 or C free)

PS: For some of the online Tetris or snake-like color game code, usually need to use the Graphics.h graphics library

And this library is provided by TURBO.C, assuming that the vc++6.0 on the direct execution will be an error!

There is only a need to install a Easyx Library , select the VC6 version number to install it!

The link is given later.


The following two compilers two select one to


1.VC + + 6.0 full Green edition

① Click on the vc++6.0 icon to enter the encoding interface:



② Click File, New, pop Up the following dialog box



③ Writing code:




The ④ code is written and then compiled and executed.

Click on the Two button in the menu bar:



PS: These two corresponding shortcut keys are CTRL + F7 and Crtl + F5, General people, I don't tell him, O (╯-╰) o


⑤ here is not executable, because we have errors, when we click Compile, the following console will show this error:


This shows that the program has an error, 0 warnings, there is an error can not be executed, the warning can be executed!

We'll scroll up the mouse wheel and we'll find the error message.

This sentence is very obvious, we also know that the semicolon is missing, double-click on this line can come to the code where the error, the missing semicolon after the statement to add a semicolon on it!


⑥ compile again, prompting for no errors and warnings, click the Execute button to eject the Output form (console)




2. Use of C-free5:

① Click on the desktop icon after installation:



② a prompt to see the code that was written recently, or to create a new blank file directly

More humane than VC6



③ You can create a blank file directly here, you can also enter the time to build, click Close

After entering, click on the file ===> new to create a new file



④ writing code within the editing area allows you to:

C-free 5 provides the prompt input function, for example, you enter some character set in C, will give the corresponding prompt, such as printf, when you enter the PRI will prompt, select, Enterf self-complement



⑤ after saving the code, compile, execute



⑥ It is good for us to omit the semicolon after printf (). See what the error message is:




⑥ Double-click Error to go to the wrong location. to join; recompile to execute:




⑦ Output Results:






Section:

① the relationship between computer and programming language;

A brief history of the development of ② programming language

The related characteristics of ③c language

Compiling and executing ④c programs

⑤ the basic use of the two popular editors who have just started learning



Appendix:

Download this chapter: Click to download the material ~


C Language High-speed entry series (i)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.