A general-purpose, imperative computer programming language, supporting structured programming, lexical variable scope and recursion, while a static type system prevents many unintended operations.
Like most procedural languages in the ALGOL tradition, C has facilities for structured programming and allows lexical variable scope and recursion. Its static type system prevents unintended operations. In C, all executable code is contained within subroutines (also called “functions”, though not strictly in the sense of functional programming). Function parameters are always passed by value. Pass-by-reference is simulated in C by explicitly passing pointer values. C program source text is free-format, using the semicolon as a statement terminator and curly braces for grouping blocks of statements.
The C language also exhibits the following characteristics:
if/else
, for
, do/while
, while
, and switch
. User-defined names are not distinguished from keywords by any kind of sigil.+
, +=
, ++
, &
, ||
, etc.struct
) allow related data elements to be accessed and assigned as a unit.month[11]
.enum
keyword. They are freely interconvertible with integers.void
.static
and extern
attributes.While C does not include certain features found in other languages (such as object orientation and garbage collection), these can be implemented or emulated, often through the use of external libraries (e.g., the GLib Object System or the Boehm garbage collector).
Many later languages have borrowed directly or indirectly from C, including C++, C#, Unix’s C shell, D, Go, Java, JavaScript (including transpilers), Limbo, LPC, Objective-C, Perl, PHP, Python, Rust, Swift, Verilog and SystemVerilog (hardware description languages).[4] These languages have drawn many of their control structures and other basic features from C. Most of them (Python being a dramatic exception) also express highly similar syntax to C, and they tend to combine the recognizable expression and statement syntax of C with underlying type systems, data models, and semantics that can be radically different.
Internet is huge! Help us to find great IoT resources and products.
The ioTStash is a collection of all the best resources and products related to the Internet of Things.
Discover the Internet of Things and beyond.
Leave a Reply