Facts of C Programming Language
Facts of C Programming Language
CµÄÒ»Ð©ÕÆ¹Ê
(Ó¢ÎÄÔÎÄ:http://www.programmingfacts.com/2009/12/01/facts-of-c-programming-language/)
C programming language was developed in 1972 by Dennis Ritchie and Brian Kernighan at the Bell Telephone Laboratories (AT&T Bell Laboratories) for use with the Unix operating system for programming computer operating systems. C is a procedural oriented programming language.
CÓïÑÔÊÇÔÚ1972ÄêÓɱ´¶ûʵÑéÊÒµÄDennis RitchieºÍBrian KernighanΪ¿ª·¢²Ù×÷ϵͳ£¬ÎªUnixÌṩ±à³ÌÓïÑÔ¶øÊµÏֵġ£ËüÊÇÃæÏò¹ý³ÌµÄ±à³ÌÓïÑÔ¡£
C was designed as a minimalist language to be used in writing operating systems for minicomputers, which had very limited memories compared with the mainframe computers of the period
C×î³õÖ÷ÒªÊÇÓÃÀ´ÎªÎ¢»ú±àд²Ù×÷ϵͳ£¬Òò¶ø±»Éè¼ÆµÄ“СÇÉ”¶øÓÖ¸»ÓÚ³éÏóÁ¦£¬ÒòΪºÍµ±Ê±µÄ´óÐÍ»úÏà±È£¬Î¢»úµÄÄÚ´æ·Ç³£ÓÐÏÞ¡£
Also C was designed for implementing system software. Although C was designed for implementing system software,it is also widely used for developing portable application software.
µ±È»£¬CÒ²±»Éè¼Æ³ÉÊÊÓÚ±àдϵͳÈí¼þ¡£ËäÈ»CÊÇϵͳ¼¶±à³ÌÓïÑÔ£¬µ«ÔÚ¿ÉÒÆÖ²Ó¦ÓÃÈí¼þ¿ª·¢ÁìÓò£¬µ½´¦¶¼¿ÉÒÔ¿´µ½ËüµÄÉíÓ°¡£
The initial development of C was devised during 1969–73, alongside the early development of the UNIX operating system. It was based on CPL (Combined Programming Language), which had been first condensed into the B programming language and later on it was called as computer programming language by Ken Thompson, an American computer scientist and a colleague of Ritchie. Ritchie rewrote and restored features from BCPL to create C-Programming Language, rewrite the development of the Unix operating system in C language.
CµÄ×î³õ¿ª·¢ÓëʵÏÖÊǺÍUNIXϵͳһÆð½øÐеģ¬Ê±¼äÊÇ1969µ½1973Äê¡£CÓïÑÔ»ùÓÚCPL£¨»ìºÏ±à³ÌÓïÑÔ£¬Òë×¢£ºCombined Programming LanguageÊÇÔçÆÚµÄÒ»ÖÖ¼ÆËã»ú±à³ÌÓïÑÔ£¬Óɽ£ÇÅ´óѧÊýѧʵÑéÊÒºÍÂ×¶Ø´óѧ¼ÆËã»úÑо¿ÊÒÁªºÏ¿ª·¢µÄ£©,ÈËÃǽ«CPLÓïÑÔµÄÌØÐÔÈÚÈëµ½BÓïÑÔÖУ¨Òë×¢£º¼´ºóÀ´µÄBCLPÓïÑÔ£©£¬ÃÀ¹ú¼ÆËã»ú¿ÆÑ§¼ÒKen ThompsonºóÀ´³ÆBΪ¼ÆËã»ú±à³ÌÓïÑÔ£»KenÊ
Ïà¹ØÎĵµ£º
Ò»¡¢malloc()ºÍfree()µÄ»ù±¾¸ÅÄîÒÔ¼°»ù±¾Ó÷¨
1¡¢º¯ÊýÔÐͼ°ËµÃ÷
void *malloc(long NumBytes)£º¸Ãº¯Êý·ÖÅäÁËNumBytes¸ö×Ö½Ú£¬²¢·µ»ØÁËÖ¸ÏòÕâ¿éÄÚ´æµÄÖ¸Õë¡£Èç¹û·ÖÅäʧ°Ü£¬Ôò·µ»ØÒ»¸ö¿ÕÖ¸Õ루NULL£©¡£ ¹ØÓÚ·ÖÅäʧ°ÜµÄÔÒò£¬Ó¦¸ÃÓжàÖÖ£¬±ÈÈç˵¿Õ¼ä²»×ã¾ÍÊÇÒ»ÖÖ¡£
void free(void *FirstByte)£º ¸Ãº¯ÊýÊǽ«Ö®Ç°ÓÃmalloc· ......
CÓïÑÔËùÓи´ÔÓµÄÖ¸ÕëÉùÃ÷£¬¶¼ÊÇÓɸ÷ÖÖÉùÃ÷ǶÌ×¹¹³ÉµÄ¡£ÈçºÎ½â¶Á¸´ÔÓÖ¸ÕëÉùÃ÷ÄØ£¿ÓÒ×ó·¨ÔòÊÇÒ»¸ö¼ÈÖøÃûÓÖ³£Óõķ½·¨¡£²»¹ý£¬ÓÒ×ó·¨ÔòÆäʵ²¢²»ÊÇC±ê×¼ÀïÃæµÄÄÚÈÝ£¬ËüÊÇ´ÓC±ê×¼µÄÉùÃ÷¹æ¶¨ÖйéÄɳöÀ´µÄ·½·¨¡£C±ê×¼µÄÉùÃ÷¹æÔò£¬ÊÇÓÃÀ´½â¾öÈçºÎ´´½¨ÉùÃ÷µÄ£¬¶øÓÒ×ó·¨ÔòÊÇÓÃÀ´½â¾öÈçºÎ±çʶһ¸öÉùÃ÷µÄ£¬Á½Õß¿ÉÒÔ˵ÊÇÏà·´µÄ¡£ÓÒ×ó·¨Ôò ......
/* °üº¬CÍ·Îļþ */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
/* °üº¬SQLCAÍ·Îļþ */
EXEC SQL INCLUDE sqlca;
EXEC SQL INCLUDE sqlda;
int main()
{
EXEC SQL BEGIN DECLARE SECTION;
int money;
......
Ö¸ÕëÊÇCµÄÁé»ê£¬ÕýÊÇÖ¸ÕëʹµÃC´æÔÚÁËÕâô¶àÄ꣬¶øÇÒ½«³¤ÆÚ´æÔÚÏÂÈ¥¡£ÊÂʵÉÏ£¬ÎÒ×Ô¼º²»ÓÃCÓïÑÔд³ÌÐòÒѾÓÐÒ»ÄêÁË£¬¹¤×÷ÖнӴ¥µ½µÄÖ»ÓÐjava£¬pythonºÍjavascript.×î½üÓÃCÍê³ÉÁËÒ»ÏÂÀàËÆÓÚOOÖеķâ×°£¨¼´"Àà"£©µÄ¸ÅÄ˳±ã°ÑÖ¸Õ븴ϰÁËÏ£¬¸Ð¾õÓбØÒª¼Çһϡ£
±¾ÎÄÖеÄÀý×ÓÓÐÕâÑùÁ½¸ö¸ÅÄÈÎÎñ£¨Task£© ......
±¾ÎÄÕª×ÔI18nGuy
Ö÷Ò³µÄһƪÄÚÈÝ£¬ÔÎĵØÖ·£ºhttp://www.i18nguy.com/unicode/c-unicode.zh-CN.html
Õâ·ÝÎĵµ¼òÒªµÄ˵Ã÷ÁËÈçºÎÐÞ¸ÄÄãµÄC/C++´úÂëʹ֧֮³ÖUnicode¡£ÔÚÕâÀï²¢²»×¼±¸
½âÊÍÌ«¶àÏà¹ØµÄ¼¼Êõϸ½Ú²¢ÇÒÎҵüٶ¨ÄãÒѾ»ù±¾ÊìϤMicrosoftÖ§³ÖUnicodeµÄ·½Ê½¡£
ËüµÄÖ÷ҪĿµÄÊÇ·½±ãÄã²éѯÏà¹ØµÄÊý¾ÝÀàÐͺͺ¯Êý£¬ÒÔ¼°ÐÞ ......