C language description and Visual C ++ 6.0 to download, install and use Introduction

C language features:

1, C language is simple, compact, easy to use and flexible.
1) ANSI C, a total of 32 keywords
2) 9 kinds of control statements, free writing program, mainly represented by lower-case letters, compressed all unnecessary ingredients.
2, the operator rich, total 34 kinds
3, the rich data structure type
4, having the structure of control statements
5, less stringent limits syntax, the program design freedom.
6, C language allows direct access to physical address can be performed (bit) operations, most of the functions can be realized in assembly language, can operate directly on the hardware. So some people call it intermediate language
7, object code generated high quality, high efficiency of program execution.
8, compared with assembly language, written in C language program portability.
However, the requirements of the C language programmers is high, programmers write programs in C will feel less restriction, flexibility, powerful, but compared to other high-level language in learning to be more difficult.

Face process and object-oriented programming ideas

Process-oriented : "process-oriented" is the kind of thing centric programming ideas. At step analysis is needed to solve the problem, then use the function to implement these steps, step by step, when used in a call to a turn on it.

Object-oriented : "object-oriented" (Object Oriented, referred to as OO) is a kind of thing centric programming ideas.

Simple C program describes
[1.1] Example '

void main()
{
printf("世界,您好!\n");/ /此处能够使用中文是因为用两个双引号圈住了!
}

(Note: the symbol to distinguish between Chinese and English, ":." Must be in English)

Analysis program:
main function is the function name of the Lord, that this is a main function.
Each must have a C source program, and only one main function (main function).
Function call statement, the function printf function is to be output to the display content to display.
printf function is a standard function defined by the system, it can be directly invoked in the program.

[Example 1.2]

#include <stdio.h>
#include <math.h>
void main(){
double x,s;
printf(“input number :\n”);
scanf("%lf",&x);
s = sin(x);
printf(“sin of %lf is %lf\n”,x,s);
}

Analysis procedures:
the include file contains commands called
extension .h file called header file
defines two real variables, to be used later in the program
display a message
obtained from the keyboard a real number x
the sine of x, and assign it to variables s
display program calculation result
main function is terminated

Next, a simple statement about today's practice experience

The compiler is installed --- Visual C ++ 6.0 to download and install

First of all it, Visual C ++ 6.0 will not run win10 above, but the brightest Gangster on Baidu amazing ah, there is always a green version can be on your mind, I chose a full version, it is not the latter need to install plug-ins, and secondly, that is, the installation steps, basically click OK with the next step, the installation path I chose the default directory of the C drive, it would be more like this to find a method, not paper, quickly installed a. (Picture on hold, and forget the screenshot (:)

The compiler uses --Visual C ++ using 6.0

After installed, first of all, to observe the top row of the toolbar:

Click File, point New, the following interface:

Here Insert Picture Description
We click on the Project, create a new project and select Win32 Console Application, you can choose the name of the project, but as a beginner, to develop a good habit is very important, so the best is the project name has some significance; Next is to choose the location, the directory can choose a new folder, you can also select the default. Finally, click OK, well, congratulations, has completed a new project is created.

Here Insert Picture Description
We click on Files, create a new file, because it is in learning C language so we choose C ++ source file, the file name can be your choice, but to add the suffix .c to distinguish C ++ files, because we are using a C ++ compiler, then down is to choose the location, the directory can choose a new folder, you can also select the default. Then you must remember to click Add to project, and finally click OK, and a new file .c file has been created, you can happily start knocking the code slightly, where the first shots of code uploaded Hall C language class today (punch want to stick with it every day and complete the C linguistics down! refueling refueling)
Here Insert Picture Description
Here Insert Picture Description

Published 10 original articles · won praise 1 · views 1249

Guess you like

Origin blog.csdn.net/weixin_43671182/article/details/93902753