C Programming Language:

What is C Programming Language?
  • Derived from 2 programming languages (1)BCPL(Basic Combined Programming Language) by Martin Richards and  (2) B by Ken Thompson. 
  • Developed by Dennis Ritchie at Bell Labs during early 1970's.
  •  Is an example of a structured language 

  First locate TC.EXE in C:\Tc\Bin and double click

Working With Programs 
  •  Creating a New Program
First click FILE then NEW OPENING on EXISTING PROGRAM -Open or F3.

  • Saving A Program
Simply click SAVE or press F2 on your keyboard.

  • Running A Program
 Click Run or Ctrl+F9

  • Sample Program
//my first program in C
int main()
printf("Hello World");
return 0;
  • Dissection:
  1. Comment - is a piece of source code discarded from the code by the compiler types
  • //comment
  • /*block of comment*/
     2. Preprocessor directive - are lines included in the code of our programs that are not program statements but directives for the preprocessor. These lines are always preceded by a hash sign (#). The preprocessor is executed before the actual compilation of code begins, therefore the preprocessor digests all these directives before any code is generated by the statements.

3. Main Function  - is the point by where all C programs begin their execution.

4. printf -is the standard output stream in C.

5. The return instruction causes main() to finish and return 0.

That's all! Any questions?
filed under: ,
Copyright © 2005 Sports Avenue Online