Introduction to Programming (using turbo C)

The Origin of C
> invented by Dennis Ritchie on a DEC PDP-II using the UNIX Operating System.
> it was completed in 1978 by BORLAND.

Used of C Language
> operating system
> interpreter
> editors
> assemblers
> compilers
> database manager

BCPL (Basic Computer Program Language) -> a typeless program language.

Turbo C Environment
> file menu or the main menu
> editor status line and window
> compile message window
> hot-key reference line

The Turbo C Essentials

sample program:

#include<stdio.h>
/* sample program #1*/

main()
{
int age=18;
printf(“my age is %d \n”,age);
getch();
}

#include<stdio.h> -> preprocessor directive (to start at the main function)
/* sample program #1*/ -> text surrounded by /* and */ is a comment.
main() -> group of related instructions, also called statements which together perform a particular task.
int age=18; -> variable declaration (variables used to represent a value and used for memory allocation)
printf(“my age is %d \n”,age); -> printfile
–  printf() -> the name of the function printf() stands for PRINT with Formatting.
getch() -> get character