Page 26 - C-Language
P. 26

Chapter 1: Getting started with C Language




        Remarks



        C is a general-purpose, imperative computer programming language, supporting structured
        programming, lexical variable scope and recursion, while a static type system prevents many
        unintended operations. By design, C provides constructs that map efficiently to typical machine
        instructions, and therefore it has found lasting use in applications that had formerly been coded in
        assembly language, including operating systems, as well as various application software for
        computers ranging from supercomputers to embedded systems.

        Despite its low-level capabilities, the language was designed to encourage cross-platform
        programming. A standards-compliant and portably written C program can be compiled for a very
        wide variety of computer platforms and operating systems with few changes to its source code.
        The language has become available on a very wide range of platforms, from embedded
        microcontrollers to supercomputers.


        C was originally developed by Dennis Ritchie between 1969 and 1973 at Bell Labs and used to re-
        implement the Unix operating systems. It has since become one of the most widely used
        programming languages of all time, with C compilers from various vendors available for the
        majority of existing computer architectures and operating systems.


        Common Compilers



        The process to compile a C program differs between compilers and operating systems. Most
        operating systems ship without a compiler, so you will have to install one. Some common
        compilers choices are:

            •  GCC, the GNU Compiler Collection
            •  clang: a C language family front-end for LLVM
            •  MSVC, Microsoft Visual C/C++ build tools


        The following documents should give you a good overview on how to get started using a few of the
        most common compilers:

            •  Getting started with Microsoft Visual C
            •  Getting started with GCC


        Compiler C version Support


        Note that compilers have varying levels of support for standard C with many still not completely
        supporting C99. For example, as of the 2015 release, MSVC supports much of C99 yet still has
        some important exceptions for support of the language itself (e.g the preprocessing seems non-
        conformant) and for the C library (e.g. <tgmath.h>), nor do they necessarily document their
        "implementation dependent choices". Wikipedia has a table showing support offered by some




        https://riptutorial.com/                                                                                2
   21   22   23   24   25   26   27   28   29   30   31