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Ê
Ïà¹ØÎĵµ£º
ÓÃlinux C ϵĺ¯Êýµ÷Óô´½¨ÖÐÎÄĿ¼¡¢ÎļþµÈ£¬×Ö·û´®µÄ±àÂë¸ñʽҪÇóÊÇutf-8¸ñʽµÄ¡£
±ÈÈçÏëҪʹÓà int mkdir(const char *pathname, mode_t mode); ´´½¨Ò»¸öÖÐÎĵÄĿ¼¡£ÄÇôpathnameµÄ±àÂë¸ñʽҪÇóÊÇutf-8µÄ£¬¶ø²»ÄÜÊÇgb3212/gbkµÄ£¬·ñÔò¾ÍÊÇÂÒÂë¡£
ÄÇôÈç¹ûlinux CÏÂÈçºÎ½øÐÐgbk<---->utf-8±àÂëת»»µÄ±àÂë×°»»µÄ ......
£¨1£©zImage×Ô½âѹ
±¾ÎÄÒÔÁ÷ÐеÄSamsung¹«Ë¾µÄS3C2410£¬mini2440ƽ̨ºÍlinux-2.6.29ΪÀý£¬½éÉÜÈçºÎÔÚZIXǶÈëʽ¿ª·¢»·¾³ÏÂ̽Ë÷linuxÄÚºËÆô¶¯¹ý³Ì¡£
LinuxÄÚºËÆô¶¯Ò»°ãÓÉÍⲿµÄbootloaderÒýµ¼£¬Ò²¿ÉÒÔÔÚÄÚºËÍ·²¿Ç¶ÈëÒ»¸öloader£¬Êµ¼ÊµÄÓ¦ÓÃÖÐÕâÁ½ÖÖ·½Ê½¶¼»á¾³£Óöµ½¡£ËùÒÔÒªÁ˽âÄÚºËÆô¶¯×ʼµÄ¹ý³Ì£¬±ØÐë¶ÔbootloaderÈçºÎ ......
ÔÚANSI CÖУ¬¶ÔÎļþµÄ²Ù×÷·ÖΪÁ½ÖÖ·½Ê½£¬¼´Á÷ʽÎļþ²Ù×÷ºÍI/OÎļþ²Ù×÷£¬ÏÂÃæ¾Í·Ö±ð½éÉÜÖ®¡£
Ò»¡¢Á÷ʽÎļþ²Ù×÷
¡¡¡¡ÕâÖÖ·½Ê½µÄÎļþ²Ù×÷ÓÐÒ»¸öÖØÒªµÄ½á¹¹FILE£¬FILEÔÚstdio.hÖж¨ÒåÈçÏ£º
typedef struct {
int level; /* fill/empty level of buffer */
unsigned flags; /* File status flags */
char fd; /* File des ......
CÓïÑÔÖпɱä²ÎÊýµÄÓ÷¨
ÎÒÃÇÔÚCÓïÑÔ±à³ÌÖлáÓöµ½Ò»Ð©²ÎÊý¸öÊý¿É±äµÄº¯Êý,ÀýÈçprintf()
Õâ¸öº¯Êý,ËüµÄ¶¨ÒåÊÇÕâÑùµÄ:
int printf( const char* format, ...);
Ëü³ýÁËÓÐÒ»¸ö²ÎÊýformat¹Ì¶¨ÒÔÍâ,ºóÃæ¸úµÄ²ÎÊýµÄ¸öÊýºÍÀàÐÍÊÇ
¿É±äµÄ,ÀýÈçÎÒÃÇ¿ÉÒÔÓÐÒÔϲ»Í¬µÄµ÷Ó÷½·¨:
printf("%d",i);
printf("%s",s);
printf( ......