C Language Tutorial
C language is a general-purpose, procedural computer programming language. In 1972, Dennis Ritchie developed C language at Bell Labs to port and develop the UNIX operating system.
C language is widely used in computing and is as popular as Java programming language, both of which are extensively used by modern software programmers.
The latest standard for C language is C18, preceded by standards such as C17, C11, and C99.
Who Should Read This Tutorial?
This tutorial is designed for software programmers who need to learn C language from scratch. It will provide you with sufficient understanding of C language to enhance your professional knowledge.
Knowledge Required Before Reading This Tutorial:
Before starting this tutorial, you should have a basic understanding of computer programming terms. A basic understanding of any programming language will help you understand C language concepts and accelerate your learning process.
Compiling/Executing C Programs
Example
#include <stdio.h>
int main()
{
/* My first C program */
printf("Hello, World! \n");
return 0;
}
Example Analysis:
- All C language programs require the main() function. Execution starts from the main() function.
- /* ... */ is used for comments.
- printf() is used for formatted output to the screen. The printf() function is declared in the "stdio.h" header file.
- stdio.h is a header file (standard input output header file), and #include is a preprocessor command to include the header file. If the compiler encounters printf() without finding the stdio.h header file, a compilation error will occur.
- return 0; statement is used to exit the program.