C Programing |
Many of the important ideas of C stem from the language BCPL, developed by Martin Richards. The influence of BCPL on C proceeded indirectly through the language B, which was written by Ken Thompson in 1970 for the first UNIX system on the DEC PDP-7.
BPCL and B are type less languages. By contrast, C provides a variety of data types. The fundamental types are characters, and integers and floating point numbers of several sizes. In addition, there is a hierarchy of derived data types created with pointers, arrays, structures, and unions. Expressions are formed from operators and operands; and expression including an assignment or a function call, can be a statement. Pointers provide for machine independent address arithmetic.
C provides the fundamental control-flow constructions required for well structured programs;statement frouping, decision making (if-else), selecting one of a set of possile cases(switch), looping with the termination test at the top(whhile,for) or at the bottom(do), and early loop exit(break).
Functions may return values of basic types, structures, unions, or pointers. Any function may called recursively. Local variables are typically :automatic," or created a new with each invocation. Function definitions may not be nested but variables may be declared in a block-structured fashion.
0 comments :
Post a Comment