1. Learning Objectives

  1. Learn about the DevC integrated development environment
  2. Learn about integrated development environments
  3. Learn about the HelloWorld program
  4. Understand how to write HelloWorld program

directory

Is C really hard? If you don’t see this picture, you can easily learn C by breaking it into parts. (4) Basic data types and variables of the language (5) Variables, constants and operations of the C language (6) Easy to understand the logical operations of the C language (7) : (11) C language pointer is originally like this: (11) C language custom function is really very simple twelfth chapter: (12) the original structure is such a thing :(13) socket server prepared

C language novice 100 error solutions

recommended

I am participating in 1024 activity, welcome everyone to like, favorites, comments on my dry goods articlesAn article to guide you from 0 to 1 to know how to build a website and complete the COMPILATION of CMS system

Welcome everyone to pay attention to the public account, the public account every 1024 and 1024 times will be lucky draw a mechanical keyboard + 2 IT books oh ~

2. Understand Devc software

Devc is a development software under Windows system, the correct name is integrated development environment, English abbreviation IDE. In the following C language development, we will use Devc software for development.

2.1 What is an IDE Before you can understand an IDE, you need to know what a development environment is. A development environment is one or more pieces of software that support software or systems.

Taking software development as an example, other tools, plug-ins and libraries are needed to write software in normal development work. These tools, plug-ins and libraries are called the environment of the software currently under development. Using mobile phone software for example, an Android wechat program can not run on a PC, such as Windows system can not directly run android phone software; In this example, the operating environment of wechat program of Android system is Android system, not Windows system. The environment refers to the program that can support the operation of the software. A system is also a software program.

From the above examples, we can see that in computers, the environment refers to the support for a piece of software. The development environment is the supporting software required for the current development category.

An integrated development environment (IDE) is a software or system that contains all the support for the development and only needs to be developed on the system, or the use of the software for development does not need other support. Integration means that the software integrates other supporting software.

IDE stands for Integrated Development Environment, which translates into Integrated Development Environment.

2.2 Why Devc is recommended

Why Devc? I have met a lot of students who are beginners in C language, and some of them feel that they can’t do anything if they change a software. In fact, in software development, development software supports the development of a choice, essentially all changes in the use of software can not have a fundamental impact on the program development. C language is a language, the development software is just a code editor, as long as the C language standard or itself has not changed, C language itself will not be affected, only “itself” can affect “itself”.

The fundamental reason Devc is recommended is because of the software’s brief features, beginners do not need to click multiple times to successfully create a C file. In Devc, the minimalist creation method allows beginners to reduce the threshold of entry, unlike some software, creating a C language file also need to choose different categories, different forms to create a basic C language file; The tedious creation process makes many novices recoiled, because there are a lot of technical terms in the tedious process that they have not been exposed to or do not understand. Using Devc makes it easy for beginners to create C files and only do things they can understand.

2.3 Downloading and installing Devc

Devc download directly through the search engine search can find download links, such as search less than the students can pay attention to the public, “* * * * * * * * * * * * * * * * * * * * * * * * * *” reply Devc for download links.

After downloading the Devc software, double-click to open it. Software starts loading:

Step one:

After opening the software, select the language that the software displays. Find the Chinese option in the language drop-down list. Suppose you can’t find Chinese when you install it, or you have the same situation as I did.



As shown in the figure above, all the drop-down options have no Chinese characters. Then I find the option with the most garbled characters. As shown in the figure above, I can select this option. This may be caused by the encoding format of the software system or the encoding of the current computer is inconsistent or missing. Encoding format refers to the transformation of some specified information in a specific way to generate another form. For example, Chinese has a specific encoding mode, assuming that there is no Chinese encoding in our current system, then “garbled code” will appear.

We found no Chinese option in the current option, so we select the option that seems to have the most “garbled characters”, which is most likely to be Chinese.



Step 2:

After selection, click OK to proceed to the next installation page. The next installation page was “garbled” due to coding problems.



It doesn’t matter if there are garbled characters. According to the installation habit of the software, the button on the left is to confirm the option, so we click the button on the left to enter the next interface.



Page garbled characters also appear on the next page. In the button options here, there are not two choices for us, there are three, three buttons to install software basic habit, can be guessed is “previous page”, “next page”, “cancel”; We can find that the left button uses’ < ‘symbol, the middle button uses’ >’ symbol, and the middle button with’ >’ character is most likely to be clicked. Click to go to the next page.

Step 3:

Step 3 obviously lets us choose the location to install the software, here I install in F disk devc directory:



In the above page, according to the installation habit of the previous page, we click the button in the middle to enter the next interface.



Then the software installation interface appears.

Step four:

After the installation is complete, the following screen is displayed.



Click the default option, the first setting of the software, found that there is a language selection, but also appeared simplified Chinese option (why so, is not already selected language? I was confused, too).



Select Chinese and click the Next option.



Step 5:

Then the theme configuration appears, select your favorite theme and font, and click Next to proceed to the Next step:



Finally, click OK to complete the configuration.



Then the software interface appears and the installation is successful.

Third, the HelloWorld

In computer programming, HelloWorld generally refers to the first program a beginner writes. Write code to make the program run with the words “HelloWorld”, which means “HelloWorld” in Chinese.

3.1 Write HelloWorld program

Step one:

Open the DevC integration environment, click File on the upper left toolbar and select New. In the expand option, click Source file.

Step 2: An unnamed TAB appears, which means that the current topic is not named, so you can give it a name for clarity. In the TAB is the work area, in the work area you can write C code. Since we haven’t learned C yet, copy the following code here into a TAB paste.

#include<stdio.h>
#include<stdlib.h>
void main(a){
	printf("Hello World!");
	system ("pause");
}
Copy the code

After copying to the work area, click the compile and run button in the toolbar.

After clicking the compile and run button, the file saving location is set, the file name is set, and the saving type is C Source Files, which means that the file is saved as C language source files. Finally, click Save.



Devc will then automatically compile and connect our copy of the C program. After a while, a little black box will pop up. This little black box is the HelloWorld program that we copied. The HelloWorld program will show the word HelloWorld when the program runs.



We can view the directory to save the file, there are two files, one file type is C Source code file for C language, the other type is application, the application can be double-click run, the software is an application, double-click can run.

3.2 Modify HelloWorld program Since we have not formally learned C language, now let’s do a simple program modification. Our code will run with the word HelloWrold, now we want to display “hello, world” in Chinese how to do? We look at the C code and there is a line printf(“Hello Wrold! ); In this case, is Hello World the string just displayed? Let’s try to modify HelloWorld to be a good world. The final code is as follows:

#include<stdio.h>
#include<stdlib.h>
void main(a){
	printf("Hello world!);
	system ("pause");
}
Copy the code

Click the compile run button.



The program successfully displays “Hello world!”

Four,

Through the above description and explanation, we know the following contents:

  1. A development environment is one or more pieces of software that support software or systems.
  2. An integrated development environment (IDE) is a software or system that contains all the support for that development.
  3. Completed the editing of the first application HelloWorld and experienced the software writing and operation of a general process.

IT original animation, learning materials, original tutorials, please pay attention to the public number.