C was developed by Dennis Ritchie in 1972 and is a procedural programming language that is the predecessor to many popular languages today like C++, C#, and Java. C code is run using software like Turbo C or Borland C and uses file extensions like .c to indicate the language. A simple C program uses #include to access library functions like printf and outputs "Hello world".
2. C
? C is the successor of B(BASIC) and A(ALGOL)
languages.
? Most Popular language for over 3 decades
(30+ years)
? C is a Procedure oriented programming
language
¨C i.e. data should be assign first like
¨C Data then function.
3. Why we have to learn C?
1. To better understand other languages.
- Like:- c++, c# and java.
2. To understand how data flow with in the
compiler.
3. To development of coding logic.
4. Software are used to run c language
code.
? Turbo c or turbo c++
? Auto C
? Borland C
? These software run .c extension files which tell the compiler or interpreter
that .c file is a file that belongs to c language
? Like for c++ its .cpp
? For java its .java
? For c# its .cs extension files.
5. Lets understand C by a simple Code.
#include<stdio.h> or #include¡±stdio.h¡±
#include<conio.h> or #include¡±conio.h¡±
Void main()
{
printf(¡°Hello world¡±);
}
Output: Hello world
Note:
#include is preprocessor which tell compiler to search the directory(library files)
within <stdio.h>, ¡°conio.h¡± Here stdio.h is a library file which contain printf()
function.