计算机常用的几种语言:C语言

文章作者 100test 发表时间 2007:05:13 22:07:50
来源 100Test.Com百考试题网


计算机等级考试训练软件《百宝箱》

C
  C was developed by Dennis Ritchie as a systems programming language for UNIX.

  Lexically, C is more cryptic than PASCAL.For example, brackets are often used to obviate the need for keywords.However, underlined characters are allowed in identifiers, which can make them more understandable.

  The are a number of monadic and addict (called binary) operators.Some have unexpected precedence Brackets may be ignored by the compiler, with occasionally surprising results. There are shift operations.Overflows on integer arithmetic may be ignored. There are some composite symbols with special meanings:for example’&&,means and then’and‘means or else (called short circuit control forms invade).’==,is used for equality to avoid confusion with’=,in assignments.’!=,is used for inequality.

  They are several integer types of different sizes,and there are floating point numbers,pointers(C talks of indirection) arrays and structures,but no Booleans or sets.C is not strongly typed: for example, some compilers do not insert run-time checks on array sub-scripts, etc.Type c6nversion is permissive.Address arithmetic can be performed on pointers;Null is demoted by a zero value.

  C has procedures and functions.Parameters are:1ways passed by value:thus,for a subprogram to pirate on a given data structure, a pointer to that“,rupture has to be passed.

  There are few features (apart from procedures and functions) to support modularization- however. separate (strictly independent) compilation is al-lowed.

  C has often been compared to PASCAL, generally unfavorably. It may be easier to write, but certainly not to read, unless tricks are avoided and the text carefully annotated. Its main advantages arc efficiency (and it may not be significantly more efficient) and separate compilation.

翻译:

C语言

  C语言是由Dennis Ritchie为UNIX而开发的一种系统编程语言。

  从词法上说,C比PASCAL更难理解,如括号常用来避免关键字的使用。然而,下加线字符可被允许使用在标识符中,这样可使它们更容易理解。

  在C语言,有许多一元和二元的(被称做二进制的)操作符。 某些标识符有意想不到的优点。括号可被编译程序忽略,而且有时有惊人的效果。有许多移位操作,整 数运算的溢出可以被忽略,还有某 些具有特殊意义的复合型符号,例如:‘&&’代表‘and then’,而 ‘| |’代表’ or else’(在ADA语 言中被称做短路控制形式),‘= =’用作相等,以避免与赋值中的 ‘=’相混淆,‘!=’作不相等。
  在C语言中有凡种不同大小的整数类型,有浮点数,指针(C语言 中叫做间接性)、数组和结构,但没 有布尔型和集型,C语言不是强类 型的语言,例如,某些编译程序对 数组下标并不插入运行时间的检查 等等,允许类型转换,地址运算可 对指针执行:空用零值指出。

  C语言有过程和函数,参数总 是通过数值来传递。这样,对于在 一个给定的数据结构上操作的子程 序来说,指向该结构的指针必烦蕊以传递。

  还有一些特性(与过程及函数 无关)支持模块化,但允许分离式 的(严格地讲是独立的)编译。

  人们经常将C与PASCAL进行比 较,认为C不如PASCAL好。它可能 易写,但确实不易读,除非避开难 点和对文本仔细地加以注释,它的主要优点是效率高(并不是非常有 效的)和分离式编译。



相关文章


计算机英语:如何使用Windows
计算机英语:启动Windows
计算机常用的几种语言:FORTRAN语言
计算机常用的几种语言:PASCAL语言
计算机常用的几种语言:C语言
计算机常用的几种语言:BASIC语言
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛