C Tutorials
| Introduction to C |
C is a general-purpose programming language initially developed by Dennis Ritchie between 1969 and 1973 at AT&T Bell Labs.
C is one of the most widely used programming languages of all time, and C compilers are available for the majority of available computer architectures and operating systems.
Many later languages have borrowed directly or indirectly from C, including C#, D, Go, Rust, Java, JavaScript, Limbo, LPC, Perl, PHP, Python, and Unix's C shell. The most pervasive influence on these languages (excluding Python) has been syntactical, 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. C++ started as a preprocessor for C and is currently nearly a superset of C.
| C Characteristics |
1. There is a small, fixed number of keywords, including a full set of flow of control primitives: for, if/else, while, switch, and do/while.
2. There are a large number of arithmetical and logical operators, such as +, +=, ++, &, ~, etc.
3. More than one assignment may be performed in a single statement.
4. Function return values can be ignored when not needed.
5. Typing is static, but weakly enforced: all data has a type, but implicit conversions can be performed; for instance, characters can be used as integers.
6. Declaration syntax mimics usage context. C has no "define" keyword; instead, a statement beginning with the name of a type is taken as a declaration.
7. There is no "function" keyword; instead, a function is indicated by the parentheses of an argument list.
8. User-defined (typedef) and compound types are possible.
9. Enumerated types are possible with the enum keyword. They are not tagged, and are freely interconvertible with integers.
10. Strings are not a separate data type, but are conventionally implemented as null-terminated arrays of characters.
| C Compiler |
The source code written in source file is the high level lanaguage. It needs to be "compiled", to turn into machine language so th
at CPU can actually execute the program as per instructions given. This compiler will be used to compile your source code into executable program. GNU C/C++ complier is widely used.
| Text Editor |
Text Editor is used to write C program. Examples of few editors are Windows Notepad, OS Edit command, vim or vi. Versions of text editor may vary on different operating systems. Notepad is used on Windows and vim or vi is used on windows as well as Linux, or Unix.
The file created with editor is called source file and contain program source code and saved with extension .c. After compilation object file has been created and has the extension .obj. Further it converted to .exe extension so that we can run it.