C语言的源代码是什么意思啊

Python013

C语言的源代码是什么意思啊,第1张

C语言源代码,就是依据C语言规则所写出的程序代码,常见的存储文件扩展名为.c文件和.h文件,分别对应C源文件(source file)和C头文件(header file)。

C语言是一门编程语言,简单点说,就是由人类书写按照一定规范书写的字符,通过一定手段(编译链接)转换后,可以让电脑或者其它电子芯片"读懂",并按照其要求工作的语言。

在所有的编程语言中,C语言是相对古老而原始的,同时也是在同类语言中更接近硬件,最为高效的编程语言。

扩展资料:

C语言广泛应用于底层开发。它的设计目标是提供一种能以简易的方式编译、处理低级存储器、产生少量的机器码以及不需要任何运行环境支持便能运行的编程语言。

它能提供了许多低级处理的功能,可以保持着良好跨平台的特性,以一个标准规格写出的C语言程序可在许多电脑平台上进行编译,甚至包含一些嵌入式处理器(单片机或称MCU)以及超级电脑等作业平台。

编译器主要有Clang、GCC、WIN-TC、SUBLIME、MSVC、Turbo C等。

参考资料:百度百科-源码

 C语言是一个由ISO组织中的ANSI制定的标准,任何个人或者组织都可以根据这个标准将其实现。现今,世界上有许多不同的C语言实现,比较著名的有:GCC、Watcom、MS C等,其中前两者是开源的,后者是闭源的。下面粘贴几个老外的回答(原回答链接)。

The C language is not a piece of software but a defined standard, so one wouldn't say that it's open-source, but rather that it's an open standard.

There are a gazillion different compilers for C however, and many of those are indeed open-source. The most notable example is GCC's C compiler, which is all under the GNU General Public License (GPL), an open-source license.

There are more options. Watcom is open-source, for instance. There is no shortage of open-source C compilers, but without a doubt the most widespread one, at least in the non-Windows world, is GCC.

For Windows, your best bet is probably Watcom or GCC by using Cygwin or MinGW.

C is a standard which specifies how C compilers should generate programs.

C itself doesn't have any source code, just like a musical note doesn't have any plastic.

Some C compilers, such as GCC, are open source.

C is just a language, and a standardised one at that, too. It pretty much is the compiler that "does all the work". Different compilers did have different dialectsbefore the the C99 ANSI standard, you had things like Borland C and other competing compilers, that implemented the C language in their own fantastic ways.

stdlib is just an agreed-upon collection of standard libraries that are required to be present in any ANSI C implementation.

关于C++开源与否:

与C语言类似,C++也是由ISO/ANSI制定的一个标准,所谓的“官方”并未给出确切的实现,任何组织与个人都可以根据标准自己开发一个C++编译器出来。出名的C++编译器有:GCC/G++、libc/libc++、clang(++)、 Visual studio和MS´ runtime等。也把老外的几个回答贴出来(原回答链接)。

C++ itself is only a description what the language should be,

without a definite implementation.

Anyone can make his own implementations (compiler etc, runtime library, ...)

and call it C++ if it fits to the description.

http://www.open-std.org/jtc1/sc22/wg21/

And if a implementation is open source depends on the creator.

Examples of implementation (parts):

GCC/G++, libc/libc++, clang (++ too), Visual studio and MS´ runtime...

C++ is developed by an ISO standard committee. There's also a C++ foundation that runs a web site you might want to read.

C++ itself is a language, not a specific implementation, so there's no source code available for the standard/language itself.

Some C++ implementations are open source (e.g., Gnu and Clang).

1. C++ is a code standard defined by the International Organization of Standardization (ISO). There are many different implementations of the language, but they all tend to conform to C++11. Unlike Linux or Qt, C++ is just a standard, and to use any code written in the language you'll need a compiler. The major compilers (list from Wikipedia) are LLVM Clang, GCC, Microsoft Visual C++, and the Intel C++ Compiler.

2. C++ revisions are dealt with by ISO, and are influenced primarily by the maintainers of the above four implementations.

3. Clang and GCC are both open-source, I'm sure if you poke around you can find other conforming compilers but those are the two most used.

 总之,跟Java、Python和PHP这样所谓的开源语言不同,C语言与C++没有官方提供的各自确切的实现代码(库),ISO/ANSI仅仅提供了C和C++的标准。

      这些都是我从自个儿博客摘抄来的,也不见得有人看得到。