Академический Документы
Профессиональный Документы
Культура Документы
A brief history of c
C programming language is perhaps the most popular
programming language. C was created in 1972 by Dennis Richie on a DEC PDP-11 That was used in the Unix operating system .c is a development process that started with an older language call BCPL.BCPL was invented by Martin Richards, and it is influenced a language called B , which was created by Ken Thompson. B is the development of C in 1970s C is a programming language was first described In the programming language by Brian Kernighan and Dennis Ritchie (Englewood cliffs, N.J.:Prentice-Hall, in 1978) in the summer at 1983 a committee was established to create an ANSI (American National standards institute) standard world define the language The ANISIC standard was finally adopted in December 1989, The standard was also adopted by ISO (international standard organization),and the resulting standard was typically referred to as ANSI/ISO standard C)
1. Procedure Oriented language 2.In this category we are able to create our project or programs using procedural approach means in this type we can able to divide our big project/program into small subroutines or procedures. After making procedures we can able to call a procedure one or more places. The lists of procedural languages are as follows: C language C++ (Object Oriented) Java (Objected Oriented) Smalltalk (Objected Oriented) Pascal language 3. Non-Procedural Languages: This category also known as Problem Oriented languages. In this type of languages we can able to make program only at specific range like database. The followings are the examples of Non procedural language
Header Files or Preprocessor Directive contains references or links of library functions. That is built-in in the C language
Suppose if you want to use a function clrscr () ; in the main function so must bedeclared on top # include <conio.h> other wise you could have an prototype error.
Escape Sequence \n \t \ \ \r \b
Description perform line feed & Carriage return operation Prints a tab sequence on screen Prints a single quote character on screen Prints a double quote character on Screen Perform carriage return operation Remove one character from left
Example print f("A\nB"); print f("A\tb"); print f ("\a\") print f ("\"a\""); print f ("a\rb") printf ("a\bHi!" )
Example Program # 1 :
void main (void) {
printf( " -----------------------------------------------\n"); printf( "Escape sequnce \t Meaning\n"); printf( " -------------------------------------------------\n"); printf(" \\\\ \t \\" \n"); printf(" \\\ \t \ \n"); printf(" \\\" \t \" \n"); printf(" \\n \t line feed & carriage return\n "); printf(" \\t\t Tab characters or eigth spaces\n");
printf(" \\b\t Erase one char from right to left\n"); printf(" \\r\t perform only line feed\n"); getch();} } This program produces following output Example Program (Escape Sequence) -------------------------------------------Escape Sequence Meaning \\ \ \ \" \" \n line feed & carriage return \t Tab Characters or eight spaces \b Erase one char from right to left