A. c語言本身是開源的嗎,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 dialects; before 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++的標准。
這些都是我從自個兒博客摘抄來的,也不見得有人看得到。
B. 如何看c語言標准庫函數的源代碼
很遺憾,標准庫中的函數結合了系統,硬體等的綜合能力,是比較近機器的功能實現,所以大部分是用匯編完成的,而且已經導入到了lib和dll里了,就是說,他們已經被編譯好了,似乎沒有代碼的存在了.
能看到的也只有dll中有多少函數被共享.
第三方可能都是dll,因為上面也說了,dll是編譯好的,只能看到成品,就可以隱藏代碼,保護自己的知識產權,同時也是病毒的歸宿...... 當然,除了DLL的確還存在一種東西,插件程序~~~
C. 編程中的源代碼是什麼意思
C語言源代碼,就是依據C語言規則所寫出的程序代碼,常見的存儲文件擴展名為.c文件和.h文件,分別對應C源文件(source file)和C頭文件(header file)。
C語言是一門編程語言,簡單點說,就是由人類書寫按照一定規范書寫的字元,通過一定手段(編譯鏈接)轉換後,可以讓電腦或者其它電子晶元"讀懂",並按照其要求工作的語言。
在所有的編程語言中,C語言是相對古老而原始的,同時也是在同類語言中更接近硬體,最為高效的編程語言。
(3)c語言開源源碼擴展閱讀:
C語言廣泛應用於底層開發。它的設計目標是提供一種能以簡易的方式編譯、處理低級存儲器、產生少量的機器碼以及不需要任何運行環境支持便能運行的編程語言。
它能提供了許多低級處理的功能,可以保持著良好跨平台的特性,以一個標准規格寫出的C語言程序可在許多電腦平台上進行編譯,甚至包含一些嵌入式處理器(單片機或稱MCU)以及超級電腦等作業平台。
其編譯器主要有Clang、GCC、WIN-TC、SUBLIME、MSVC、Turbo C等。
D. c語言程序代碼
例如:輸入某年某月某日,判斷這一天是這一年的第幾天。
1.程序分析:以3月5日為例,應該先把前兩個月的加起來,然後再加上5天即本年的第幾天,特殊
情況,閏年且輸入月份大於3時需考慮多加一天。
2.程序源代碼:
復制代碼 代碼如下:
main()
{
int day,month,year,sum,leap;
printf("\nplease input year,month,day\n");
scanf("%d,%d,%d",&year,&month,&day);
switch(month)/*先計算某月以前月份的總天數*/
{
case 1:sum=0;break;
case 2:sum=31;break;
case 3:sum=59;break;
case 4:sum=90;break;
case 5:sum=120;break;
case 6:sum=151;break;
case 7:sum=181;break;
case 8:sum=212;break;
case 9:sum=243;break;
case 10:sum=273;break;
case 11:sum=304;break;
case 12:sum=334;break;
defaultrintf("data error");break;
}
sum=sum+day; /*再加上某天的天數*/
if(year%400==0||(year%4==0&&year%100!=0))/*判斷是不是閏年*/
leap=1;
else
leap=0;
if(leap==1&&month>2)/*如果是閏年且月份大於2,總天數應該加一天*/
sum++;
printf("It is the %dth day.",sum); }
E. 請問c語言圖像處理是不是有一個開源或公開的代碼包
你好!
你的問題,我建議你去中國最大IT技術社區CSDN的論壇發帖吧,國內編程的頂尖高手都在那裡,包括微軟專家。地址:www.csdn.net.
我的回答你還滿意嗎~~
F. 如何查看C語言,內庫的源代碼
如果是「.cpp」文件並且有VC++的環境,可直接雙擊文件打開或者先打開編譯環境,在新建一個控制台下的源文件,然後,選擇file菜單下的open找到你的文件導入,然後編譯運行;如果是其他格式的,如txt文件,也可先打開編譯環境,新建一個控制台下的源文件,然後直接復制粘貼進去,然後編譯運行;
便已運行的操作如圖:
G. C語言開源軟體項目有哪些
linux內核 opencv wxWidgets 等等等等 現在這些太多了 根本數不過來 ,現在開源是個趨勢,以後會越來越多
H. 什麼叫開源的c語言庫
開源是unix系統發展過程中產生的一個詞,意思是開放源代碼。
開源的C語言庫,就是自己可以得到源代碼的C語言庫,可以不斷地改進這個庫中的源代碼,大家共同進步,百家爭鳴,有利於C語言的發展。
I. 求c語言開源代碼最好是有文檔的網站
在c語言中,對文件夾的操作,專業的說法稱為"切換路徑/目錄",而不是"打開",因為文件夾,並不是一個"真正的文件",而只是一個訪問文件的目錄.
用c語言中的函數chdir,也就是changedirectory
intchdir(char*path)
--使指定的目錄path變成當前的工作目錄,之後所有的文件操作都是該目錄下.
比如,想切換到f盤test目錄下可以這樣:
chdir("f:\\test");
返回0表示切換成功,否則,表示失敗.